diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fd11a348..65bbdfb0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,11 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Clone SDK repositories + run: | + make clone-sdk-repos + - name: Markdown autodocs uses: dineshsonachalam/markdown-autodocs@v1.0.7 with: @@ -25,7 +30,12 @@ jobs: # Categories to automatically sync or transform its contents in the markdown files. # Defaults to '[code-block,json-to-html-table,workflow-artifact-table]' - categories: '[code-block]' + categories: '[code-block,json-to-html-table]' + + - name: Clean SDK repositories + run: | + make clean-sdk-repos + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/Makefile b/Makefile index d0cb9adc..a11cd176 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,88 @@ -.PHONY: refresh-examples +# Repository versions and URLs +COSMOS_SDK_VERSION := v0.50.13-evm-comet1-inj.3 +COSMOS_SDK_REPO := https://github.com/InjectiveLabs/cosmos-sdk.git +INJECTIVE_CORE_VERSION := v1.16.0 +INJECTIVE_CORE_REPO := https://github.com/InjectiveLabs/injective-core.git + +INDEXER_VERSION := v1.16.54 +INDEXER_REPO := https://github.com/InjectiveLabs/injective-indexer.git + +PYTHON_SDK_VERSION := v1.11.0 +PYTHON_SDK_REPO := https://github.com/InjectiveLabs/sdk-python.git + +GO_SDK_VERSION := v1.58.0 +GO_SDK_REPO := https://github.com/InjectiveLabs/sdk-go.git + +# Temporary directories +TEMP_DIR := /tmp/injective-docs-repos +COSMOS_SDK_DIR := $(TEMP_DIR)/cosmos-sdk +INJECTIVE_CORE_DIR := $(TEMP_DIR)/injective-core +INDEXER_DIR := $(TEMP_DIR)/injective-indexer +PYTHON_SDK_DIR := tmp-python-sdk +GO_SDK_DIR := tmp-go-sdk + +clone-sdk-repos: + @echo "Cloning SDK repositories..." + @git clone -q --depth 1 --branch $(PYTHON_SDK_VERSION) $(PYTHON_SDK_REPO) $(PYTHON_SDK_DIR) + @git clone -q --depth 1 --branch $(GO_SDK_VERSION) $(GO_SDK_REPO) $(GO_SDK_DIR) + @echo "SDK repositories cloned successfully!" + +clean-sdk-repos: + @echo "Cleaning up SDK repositories..." + @rm -rf $(PYTHON_SDK_DIR) + @rm -rf $(GO_SDK_DIR) + @echo "SDK repositories cleaned successfully!" + +# Documentation targets refresh-examples: + @$(MAKE) clone-sdk-repos markdown-autodocs -c code-block -c json-to-html-table -o source/includes/*.md + @$(MAKE) clean-sdk-repos + +# Internal targets without repository management +_update-errors: + @echo "Updating error documentation from repositories..." + @./scripts/extract_errors.sh $(COSMOS_SDK_DIR) $(INJECTIVE_CORE_DIR) + @echo "Generating markdown documentation..." + @./scripts/generate_errors_md.sh + +_update-proto: + @echo "Generating proto JSON files..." + @./scripts/generate_proto_json_files.sh $(COSMOS_SDK_DIR) $(INJECTIVE_CORE_DIR) $(INDEXER_DIR) + +# Public targets with repository management +update-errors-documentation: + @$(MAKE) clone-repos + @$(MAKE) _update-errors + @$(MAKE) clean-repos + +update-proto-json: + @$(MAKE) clone-repos + @$(MAKE) _update-proto + @$(MAKE) clean-repos + +# Repository management targets +clone-repos: + @echo "Cloning repositories..." + @rm -rf $(TEMP_DIR) + @mkdir -p $(TEMP_DIR) + @git clone -q --depth 1 --branch $(COSMOS_SDK_VERSION) $(COSMOS_SDK_REPO) $(COSMOS_SDK_DIR) + @git clone -q --depth 1 --branch $(INJECTIVE_CORE_VERSION) $(INJECTIVE_CORE_REPO) $(INJECTIVE_CORE_DIR) + @git clone -q --depth 1 --branch $(INDEXER_VERSION) $(INDEXER_REPO) $(INDEXER_DIR) + +clean-repos: + @echo "Cleaning up repositories..." + @rm -rf $(TEMP_DIR) + +# Combined documentation update target +update-all-proto-related-files: + @$(MAKE) clone-repos + @echo "Updating all documentation..." + @$(MAKE) -s _update-proto + @$(MAKE) -s _update-errors + @$(MAKE) clean-repos + @echo "All documentation has been updated successfully!" + +# Declare all phony targets at once +.PHONY: refresh-examples update-errors-documentation update-proto-json clone-repos clean-repos clone-sdk-repos clean-sdk-repos update-all-docs _update-errors _update-proto update-all-proto-related-files diff --git a/scripts/extract_errors.sh b/scripts/extract_errors.sh new file mode 100755 index 00000000..d5680728 --- /dev/null +++ b/scripts/extract_errors.sh @@ -0,0 +1,124 @@ +#!/bin/bash + +# Exit on any error +set -e + +# Script usage +usage() { + echo "Usage: $0 " + echo + echo "Extract error definitions from Cosmos SDK and Injective Core repositories" + echo + echo "Arguments:" + echo " cosmos-sdk-path Path to the Cosmos SDK repository" + echo " injective-core-path Path to the Injective Core repository" + echo + echo "Example:" + echo " $0 /tmp/cosmos-sdk /tmp/injective-core" + exit 1 +} + +# Check arguments +if [ $# -ne 2 ]; then + usage +fi + +# Configuration +COSMOS_SDK_DIR="$1" +INJECTIVE_CORE_DIR="$2" +BASE_OUTPUT_DIR="source/json_tables" + +# Store the original directory +ORIGINAL_DIR=$(pwd) + +# Check dependencies +if ! command -v jq &> /dev/null; then + echo "Error: jq is required but not installed. Please install jq first." + exit 1 +fi + +# Function to extract errors from a file and append to JSON array +extract_errors() { + local file=$1 + local json_objects="" + local error_pattern='errors\.Register\([[:space:]]*([^,]+)[[:space:]]*,[[:space:]]*([^,]+)[[:space:]]*,[[:space:]]*\"([^\"]+)\"' + + while IFS= read -r line; do + if [[ $line =~ $error_pattern ]]; then + error_code=$(echo "${BASH_REMATCH[2]}" | tr -d ' ') + description="${BASH_REMATCH[3]}" + + if [ -z "$json_objects" ]; then + json_objects="{\"Error Code\": $error_code, \"Description\": \"$description\"}" + else + json_objects="$json_objects,{\"Error Code\": $error_code, \"Description\": \"$description\"}" + fi + fi + done < "$file" + + if [ -n "$json_objects" ]; then + echo "[$json_objects]" | jq '.' + return 0 + fi + return 1 +} + +# Function to process modules in a directory +process_modules() { + local base_dir=$1 + local output_dir=$2 + local modules_path=$3 + + echo "Processing modules in $modules_path..." + + cd "$base_dir" + for module in "$modules_path"/*; do + # Skip if not a directory + [ ! -d "$module" ] && continue + + module_name=$(basename "$module") + echo "Processing module: $module_name" + + json_content="" + + # Check for errors.go in main folder + if [ -f "$module/errors.go" ] && content=$(extract_errors "$module/errors.go"); then + json_content="$content" + fi + + # Check for errors.go in types subfolder + if [ -f "$module/types/errors.go" ] && types_content=$(extract_errors "$module/types/errors.go"); then + if [ -n "$json_content" ]; then + json_content=$(echo "$json_content" "$types_content" | jq -s 'add') + else + json_content="$types_content" + fi + fi + + # Save if we found any errors + if [ -n "$json_content" ]; then + echo "$json_content" > "$ORIGINAL_DIR/$output_dir/$module_name.json" + echo " Found errors in module $module_name" + else + echo " No errors found in module $module_name" + fi + done + cd "$ORIGINAL_DIR" +} + +# Clean up any existing files and create directory structure +echo "Setting up directories..." +rm -rf "$BASE_OUTPUT_DIR/errors" "$BASE_OUTPUT_DIR/chain/errors" +mkdir -p "$BASE_OUTPUT_DIR/errors" "$BASE_OUTPUT_DIR/chain/errors" + +# Process Cosmos SDK repository +echo "Processing Cosmos SDK repository..." +process_modules "$COSMOS_SDK_DIR" "$BASE_OUTPUT_DIR/errors" "x" + +# Process Injective Core repository +echo "Processing Injective Core repository..." +process_modules "$INJECTIVE_CORE_DIR" "$BASE_OUTPUT_DIR/chain/errors" "injective-chain/modules" + +echo "Error extraction complete. JSON files have been created in:" +echo "- $BASE_OUTPUT_DIR/errors (Cosmos SDK modules)" +echo "- $BASE_OUTPUT_DIR/chain/errors (Injective Core modules)" \ No newline at end of file diff --git a/scripts/generate_errors_md.sh b/scripts/generate_errors_md.sh new file mode 100755 index 00000000..7a8e3ff1 --- /dev/null +++ b/scripts/generate_errors_md.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# Exit on any error +set -e + +OUTPUT_FILE="source/includes/_errors.md" +COSMOS_ERRORS_DIR="source/json_tables/errors" +INJECTIVE_ERRORS_DIR="source/json_tables/chain/errors" + +# Function to add a module's errors to the markdown file +add_module_errors() { + local file=$1 + local prefix=$2 + local module_name=$(basename "$file" .json) + + # Just capitalize the first letter + local capitalized_name=$(echo "$module_name" | perl -pe 's/^(.)/\u$1/') + + echo "## ${capitalized_name} module" >> "$OUTPUT_FILE" + echo >> "$OUTPUT_FILE" + echo "" >> "$OUTPUT_FILE" + echo "" >> "$OUTPUT_FILE" + echo >> "$OUTPUT_FILE" +} + +# Remove existing file if it exists +rm -f "$OUTPUT_FILE" + +# Add Cosmos SDK section +if [ -d "$COSMOS_ERRORS_DIR" ]; then + echo "# Cosmos SDK errors" >> "$OUTPUT_FILE" + echo >> "$OUTPUT_FILE" + for file in "$COSMOS_ERRORS_DIR"/*.json; do + [ -f "$file" ] || continue + add_module_errors "$file" "Cosmos SDK" + done +fi + +# Add Injective section +if [ -d "$INJECTIVE_ERRORS_DIR" ]; then + echo "# Injective errors" >> "$OUTPUT_FILE" + echo >> "$OUTPUT_FILE" + for file in "$INJECTIVE_ERRORS_DIR"/*.json; do + [ -f "$file" ] || continue + add_module_errors "$file" "Injective" + done +fi + +echo "Generated errors documentation in $OUTPUT_FILE" \ No newline at end of file diff --git a/scripts/generate_proto_json_files.sh b/scripts/generate_proto_json_files.sh new file mode 100755 index 00000000..a609b372 --- /dev/null +++ b/scripts/generate_proto_json_files.sh @@ -0,0 +1,545 @@ +#!/bin/bash + +# Exit on error, undefined variables, and pipe failures +set -euo pipefail + +# Script usage +usage() { + echo "Usage: $0 " + echo + echo "Generate proto JSON files from repositories" + echo + echo "Arguments:" + echo " cosmos-sdk-path Path to the Cosmos SDK repository" + echo " injective-core-path Path to the Injective Core repository" + echo " indexer-path Path to the Indexer repository" + echo + echo "Example:" + echo " $0 /tmp/cosmos-sdk /tmp/injective-core /tmp/injective-indexer" + exit 1 +} + +# Check arguments +if [ $# -ne 3 ]; then + usage +fi + +# Repository configurations +init_config() { + # Base output directory + OUTPUT_BASE_DIR="source/json_tables" + + # Injective configuration + INJECTIVE_CHAIN_PATH="$2/injective-chain" + INJECTIVE_MODULES_PATH="$INJECTIVE_CHAIN_PATH/modules" + INJECTIVE_TYPES_PATH="$INJECTIVE_CHAIN_PATH/types" + INJECTIVE_STREAM_PATH="$INJECTIVE_CHAIN_PATH/stream" + INJECTIVE_PROTO_PATH="$2/proto" + INJECTIVE_OUTPUT_DIR="$OUTPUT_BASE_DIR/injective" + + # Cosmos SDK configuration + COSMOS_MODULES_PATH="$1/x" + COSMOS_PROTO_PATH="$1/proto/cosmos" + COSMOS_OUTPUT_DIR="$OUTPUT_BASE_DIR/cosmos" + + # Indexer configuration + INDEXER_API_PATH="$3/api/gen/grpc" + INDEXER_OUTPUT_DIR="$OUTPUT_BASE_DIR/indexer_new" + + # Export all variables + export OUTPUT_BASE_DIR INJECTIVE_CHAIN_PATH INJECTIVE_MODULES_PATH INJECTIVE_TYPES_PATH \ + INJECTIVE_STREAM_PATH INJECTIVE_PROTO_PATH INJECTIVE_OUTPUT_DIR COSMOS_MODULES_PATH \ + COSMOS_PROTO_PATH COSMOS_OUTPUT_DIR INDEXER_API_PATH INDEXER_OUTPUT_DIR +} + +# Check required commands +check_requirements() { + local required_cmds=("jq") + local missing_cmds=() + + for cmd in "${required_cmds[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + missing_cmds+=("$cmd") + fi + done + + if [ ${#missing_cmds[@]} -ne 0 ]; then + echo "Error: Required commands not found: ${missing_cmds[*]}" + exit 1 + fi +} + +# Extract protobuf name from a line +get_proto_name() { + local line="$1" + local name="" + if [[ $line =~ name=([^,\"]+) ]]; then + name="${BASH_REMATCH[1]}" + fi + echo "$name" +} + +# Check if field is required +is_required() { + local line="$1" + local comment="$2" + + local comment_lower + comment_lower=$(echo "$comment" | tr '[:upper:]' '[:lower:]') + + if [[ $comment_lower == *"optional"* ]]; then + echo "No" + return + fi + + if [[ $line == *"*"* ]]; then + if [[ $comment_lower == *"mandatory"* ]]; then + echo "Yes" + else + echo "No" + fi + else + echo "Yes" + fi +} + +# Get field type without pointer symbol and handle array types +get_type() { + local line="$1" + local type="" + if [[ $line =~ [[:space:]]+([^[:space:]]+)[[:space:]]+\`protobuf: ]]; then + type="${BASH_REMATCH[1]}" + type="${type//"*"/}" + if [[ $type =~ ^\[(.*)\](.*)$ ]]; then + local base_type="${BASH_REMATCH[1]}" + local remaining="${BASH_REMATCH[2]}" + type="$base_type$remaining array" + fi + fi + echo "$type" +} + +# Process comments in a file and return results via global variables +process_comment() { + local line="$1" + + if [[ $line =~ ^[[:space:]]*\/\*.*\*\/[[:space:]]*$ ]]; then + # Single-line /* */ comment + description="${line#*/*}" + description="${description%*/}" + description="${description#"${description%%[![:space:]]*}"}" + description="${description%"${description##*[![:space:]]}"}" + return + fi + + if [[ $line =~ ^[[:space:]]*\/\* ]]; then + # Start of multi-line comment + in_multiline_comment=true + local comment_part="${line#*/*}" + comment_part="${comment_part#"${comment_part%%[![:space:]]*}"}" + comment_lines+=("$comment_part") + return + fi + + if [[ $line =~ \*\/[[:space:]]*$ ]] && [ "$in_multiline_comment" = true ]; then + # End of multi-line comment + local comment_part="${line%*/}" + comment_part="${comment_part#"${comment_part%%[![:space:]]*}"}" + [ -n "$comment_part" ] && comment_lines+=("$comment_part") + description=$(IFS=' ' ; echo "${comment_lines[*]}") + in_multiline_comment=false + comment_lines=() + return + fi + + if [ "$in_multiline_comment" = true ]; then + # Middle of multi-line comment + local comment_part="${line#"${line%%[![:space:]]*}"}" + comment_part="${comment_part#\*}" + comment_part="${comment_part#"${comment_part%%[![:space:]]*}"}" + [ -n "$comment_part" ] && comment_lines+=("$comment_part") + return + fi + + if [[ $line =~ ^[[:space:]]*//[[:space:]]*(.*) ]]; then + # Single-line // comment - these can be consecutive for multi-line descriptions + local comment_text="${BASH_REMATCH[1]}" + if [ "$in_comment" = false ]; then + comment_lines=("$comment_text") + in_comment=true + else + comment_lines+=("$comment_text") + fi + description=$(IFS=' ' ; echo "${comment_lines[*]}") + return + fi + + # Reset comment state if we encounter a non-comment, non-empty line + # But preserve comment state for empty lines (which might separate comments from fields) + if [[ ! $line =~ ^[[:space:]]*$ ]] && [[ ! $line =~ ^[[:space:]]*//.*$ ]] && [ "$in_multiline_comment" = false ]; then + # Only reset if this is not a field definition line that should use the accumulated comment + if [[ ! $line =~ ^[[:space:]]*[A-Z][[:alnum:]]*[[:space:]] ]] || [[ ! $line =~ protobuf: ]]; then + in_comment=false + comment_lines=() + description="" + fi + fi +} + +# Process a single .pb.go file +process_pb_file() { + local pb_file="$1" + local output_dir="$2" + + echo "Processing $pb_file..." + mkdir -p "$output_dir" + + local current_type="" + local description="" + local in_comment=false + local in_multiline_comment=false + declare -a fields + declare -a comment_lines + + while IFS= read -r line || [ -n "$line" ]; do + if [[ $line =~ ^type[[:space:]]+([[:alnum:]]+)[[:space:]]+struct[[:space:]]+\{ ]]; then + local new_type="${BASH_REMATCH[1]}" + + if [ -n "$current_type" ] && [ ${#fields[@]} -gt 0 ] && [[ ! "$current_type" =~ ^Event ]]; then + (IFS=$'\n'; echo "${fields[*]}") | jq -s '.' > "$output_dir/${current_type}.json" + echo "Generated $output_dir/${current_type}.json" + fi + + current_type="$new_type" + fields=() + description="" + comment_lines=() + in_comment=false + in_multiline_comment=false + continue + fi + + # Process comments and update global state + process_comment "$line" + + # Check if this line is a protobuf field definition + if [[ $line =~ ^[[:space:]]*[A-Z][[:alnum:]]*[[:space:]] ]] && [[ $line =~ protobuf: ]]; then + if [ -n "$current_type" ] && [[ ! "$current_type" =~ ^Event ]]; then + local proto_name + proto_name=$(get_proto_name "$line") + if [ -n "$proto_name" ]; then + local type + type=$(get_type "$line") + + local field_json + if [[ "$current_type" =~ ^Msg ]] || [[ "$current_type" =~ Request$ ]] && [[ ! "$current_type" =~ Response$ ]]; then + local required + required=$(is_required "$line" "$description") + field_json=$(jq -n \ + --arg param "$proto_name" \ + --arg type "$type" \ + --arg desc "$description" \ + --arg req "$required" \ + '{Parameter: $param, Type: $type, Description: $desc, Required: $req}') + else + field_json=$(jq -n \ + --arg param "$proto_name" \ + --arg type "$type" \ + --arg desc "$description" \ + '{Parameter: $param, Type: $type, Description: $desc}') + fi + + fields+=("$field_json") + fi + + # Reset comment state after using the description for a field + description="" + in_comment=false + in_multiline_comment=false + comment_lines=() + fi + fi + done < "$pb_file" + + # Write the last type if it exists and has fields + if [ -n "$current_type" ] && [ ${#fields[@]} -gt 0 ] && [[ ! "$current_type" =~ ^Event ]]; then + (IFS=$'\n'; echo "${fields[*]}") | jq -s '.' > "$output_dir/${current_type}.json" + echo "Generated $output_dir/${current_type}.json" + fi +} + +# Process all .pb.go files in a directory +process_directory() { + local source_dir="$1" + local output_dir="$2" + + # Process each .pb.go file in the directory + while IFS= read -r -d '' pb_file; do + process_pb_file "$pb_file" "$output_dir" + done < <(find "$source_dir" -maxdepth 1 -name "*.pb.go" -type f -print0) +} + +# Process a directory and its version subdirectories +process_types_directory() { + local base_dir="$1" + local output_base="$2" + local dir_name="$3" + + echo "Processing directory: $dir_name" + + # Clean up existing output directory + local output_dir="$output_base/$dir_name" + rm -rf "$output_dir" + mkdir -p "$output_dir" + + # Process .pb.go files in the main directory + process_directory "$base_dir" "$output_dir" + + # Process version subdirectories if they exist + while IFS= read -r -d '' version_dir; do + version_name=$(basename "$version_dir") + echo "Processing version directory: $version_name" + + # Create version-specific output directory + version_output_dir="$output_dir/$version_name" + mkdir -p "$version_output_dir" + + # Process .pb.go files in the version directory + process_directory "$version_dir" "$version_output_dir" + done < <(find "$base_dir" -mindepth 1 -maxdepth 1 -type d -name "v[0-9]*" -print0) +} + +# Get relative path in a cross-platform way +get_relative_path() { + local target="$1" + local base="$2" + + # Convert both paths to absolute paths + local abs_target + local abs_base + abs_target=$(cd "$(dirname "$target")" && pwd)/$(basename "$target") + abs_base=$(cd "$base" && pwd) + + # Remove the base path from the target path + echo "${abs_target#$abs_base/}" +} + +# Process a single .proto file for enums +process_proto_file() { + local proto_file="$1" + local output_base="$2" + local proto_base="$3" + + echo "Processing proto file: $proto_file" + + # Get the relative path from proto directory, removing the initial "injective/" or "cosmos/" if present + local rel_path + rel_path=$(get_relative_path "$proto_file" "$proto_base") + rel_path=${rel_path#injective/} + rel_path=${rel_path#cosmos/} + local dir_path + dir_path=$(dirname "$rel_path") + local output_dir="$output_base/$dir_path" + + # Variables for processing + local current_enum="" + declare -a enum_entries + local in_enum=false + local found_enums=false + + # Read file line by line + while IFS= read -r line || [ -n "$line" ]; do + # Remove any trailing semicolons and whitespace + line="${line%%;}" + line="${line%"${line##*[![:space:]]}"}" + + # Check for enum definition + if [[ $line =~ ^[[:space:]]*enum[[:space:]]+([[:alnum:]_]+)[[:space:]]*\{?[[:space:]]*$ ]]; then + current_enum="${BASH_REMATCH[1]}" + enum_entries=() + in_enum=true + found_enums=true + continue + fi + + # Check for end of enum + if [[ $in_enum == true && $line =~ ^[[:space:]]*\}[[:space:]]*$ ]]; then + # Write enum entries to file if we have any + if [ ${#enum_entries[@]} -gt 0 ]; then + # Create output directory only when we have enums to write + mkdir -p "$output_dir" + (IFS=$'\n'; echo "${enum_entries[*]}") | jq -s '.' > "$output_dir/${current_enum}.json" + echo "Generated $output_dir/${current_enum}.json" + fi + in_enum=false + current_enum="" + continue + fi + + # Process enum entry + if [[ $in_enum == true && $line =~ ^[[:space:]]*([[:alnum:]_]+)[[:space:]]*=[[:space:]]*([0-9]+) ]]; then + local name="${BASH_REMATCH[1]}" + local code="${BASH_REMATCH[2]}" + + # Create JSON object for this enum entry with Code first + local entry_json + entry_json=$(jq -n \ + --arg code "$code" \ + --arg name "$name" \ + '{Code: $code, Name: $name}') + + enum_entries+=("$entry_json") + fi + done < "$proto_file" + + # If no enums were found, indicate this in the output + if [ "$found_enums" = false ]; then + echo "No enums found in $proto_file" + fi +} + +# Process all .proto files in a directory recursively +process_proto_directory() { + local source_dir="$1" + local output_base="$2" + + echo "Processing proto files in $source_dir..." + + # Process each .proto file in the directory and subdirectories + while IFS= read -r -d '' proto_file; do + process_proto_file "$proto_file" "$output_base" "$source_dir" + done < <(find "$source_dir" -type f -name "*.proto" -print0) +} + +# Process a repository's modules +process_repository_modules() { + local modules_path="$1" + local output_dir="$2" + + # Process each module + for module_dir in "$modules_path"/*/; do + module_name=$(basename "$module_dir") + + if [ -d "$module_dir/types" ]; then + process_types_directory "$module_dir/types" "$output_dir" "$module_name" + fi + done +} + +# Process Cosmos SDK types directory and its subdirectories +process_cosmos_types_directory() { + local types_path="$1" + local output_dir="$2" + + echo "Processing Cosmos SDK types directory: $types_path" + process_directory_recursive "$types_path" "$output_dir" +} + +# Generic recursive directory processor for .pb.go files +process_directory_recursive() { + local source_path="$1" + local output_base="$2" + local max_depth="${3:-10}" # Safety limit to prevent infinite recursion + + # Safety check for recursion depth + if [ "$max_depth" -le 0 ]; then + echo "Warning: Maximum recursion depth reached for $source_path" + return + fi + + # Process .pb.go files in the current directory + if compgen -G "$source_path/*.pb.go" > /dev/null 2>&1; then + echo "Processing .pb.go files in: $source_path" + process_directory "$source_path" "$output_base" + fi + + # Process each subdirectory that contains .pb.go files + for subdir in "$source_path"/*/; do + if [ -d "$subdir" ]; then + local subdir_name=$(basename "$subdir") + + # Check if this subdirectory or its children contain .pb.go files + if find "$subdir" -name "*.pb.go" -type f | head -1 | grep -q .; then + echo "Checking subdirectory: $subdir_name" + local subdir_output="$output_base/$subdir_name" + mkdir -p "$subdir_output" + + # Recursively process the subdirectory + process_directory_recursive "$subdir" "$subdir_output" $((max_depth - 1)) + fi + fi + done +} + + + +# Process Indexer module +process_indexer_module() { + local module_dir="$1" + local output_dir="$2" + local module_name=$(basename "$module_dir") + + echo "Processing Indexer module: $module_name" + + # Create module-specific output directory + local module_output_dir="$output_dir/$module_name" + mkdir -p "$module_output_dir" + + # Process pb directory if it exists + local pb_dir="$module_dir/pb" + if [ -d "$pb_dir" ]; then + # Process .pb.go files + process_directory "$pb_dir" "$module_output_dir" + + # Process .proto files + process_proto_directory "$pb_dir" "$module_output_dir" + fi +} + +# Process all Indexer modules +process_indexer_modules() { + local api_path="$1" + local output_dir="$2" + + echo "Processing Indexer modules..." + + # Process each module directory + for module_dir in "$api_path"/*/; do + if [ -d "$module_dir" ]; then + process_indexer_module "$module_dir" "$output_dir" + fi + done +} + +# Initialize configuration with provided paths +init_config "$1" "$2" "$3" + +# Check requirements first +check_requirements + +# Create base output directories +mkdir -p "$INJECTIVE_OUTPUT_DIR" "$COSMOS_OUTPUT_DIR" "$INDEXER_OUTPUT_DIR" + +# Process Injective modules +echo "Processing Injective modules..." +[ -d "$INJECTIVE_TYPES_PATH" ] && process_types_directory "$INJECTIVE_TYPES_PATH" "$INJECTIVE_OUTPUT_DIR" "types" +[ -d "$INJECTIVE_STREAM_PATH/types" ] && process_types_directory "$INJECTIVE_STREAM_PATH/types" "$INJECTIVE_OUTPUT_DIR" "stream" +process_repository_modules "$INJECTIVE_MODULES_PATH" "$INJECTIVE_OUTPUT_DIR" +[ -d "$INJECTIVE_PROTO_PATH" ] && process_proto_directory "$INJECTIVE_PROTO_PATH" "$INJECTIVE_OUTPUT_DIR" + +# Process Cosmos SDK modules +echo "Processing Cosmos SDK modules..." +process_repository_modules "$COSMOS_MODULES_PATH" "$COSMOS_OUTPUT_DIR" + +# Process Cosmos SDK types directory and its subdirectories +if [ -d "$1/types" ]; then + echo "Processing Cosmos SDK types directory..." + process_cosmos_types_directory "$1/types" "$COSMOS_OUTPUT_DIR" +fi + +[ -d "$COSMOS_PROTO_PATH" ] && process_proto_directory "$COSMOS_PROTO_PATH" "$COSMOS_OUTPUT_DIR" + +# Process Indexer modules +[ -d "$INDEXER_API_PATH" ] && process_indexer_modules "$INDEXER_API_PATH" "$INDEXER_OUTPUT_DIR" + +echo "Processing complete!" \ No newline at end of file diff --git a/source/includes/_account.md b/source/includes/_account.md index c8c21c4c..4f9c3716 100644 --- a/source/includes/_account.md +++ b/source/includes/_account.md @@ -10,25 +10,24 @@ Includes all messages related to accounts and transfers. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -36,62 +35,36 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare tx msg - msg = composer.msg_deposit( - sender=address.to_acc_bech32(), subaccount_id=subaccount_id, amount=0.000001, denom="INJ" - ) + msg = composer.msg_deposit(sender=address.to_acc_bech32(), subaccount_id=subaccount_id, amount=1, denom="inj") + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -99,12 +72,14 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" @@ -112,15 +87,16 @@ import ( "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -149,7 +125,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -158,12 +134,15 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := &exchangetypes.MsgDeposit{ + msg := exchangev2types.MsgDeposit{ Sender: senderAddress.String(), SubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", Amount: sdktypes.Coin{ @@ -172,24 +151,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -197,19 +168,19 @@ func main() { ``` - - - -
ParameterTypeDescriptionRequired
senderStringThe address doing the depositYes
subaccount_idStringSubaccount ID to deposit funds into. If empty, the coin will be deposited to the sender's default subaccount address.No
amountCoinThe token amount to depositYes
+ + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
subaccount_idstring(Optional) the subaccount ID to deposit funds into. If empty, the coin will be deposited to the sender's default subaccount address.No
amounttypes.Cointhe amount of the deposit (in chain format)Yes

**Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -231,75 +202,38 @@ DEBU[0002] gas wanted: 132099 fn=func1 src="client/ch gas fee: 0.0000660495 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -310,25 +244,24 @@ gas fee: 0.0000660495 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -336,60 +269,37 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) + denom = "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5" # prepare tx msg - msg = composer.msg_withdraw(sender=address.to_acc_bech32(), subaccount_id=subaccount_id, amount=1, denom="USDT") - - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + msg = composer.msg_withdraw(sender=address.to_acc_bech32(), subaccount_id=subaccount_id, amount=1, denom=denom) + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -397,29 +307,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" "cosmossdk.io/math" - "github.com/InjectiveLabs/sdk-go/client/common" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - chainclient "github.com/InjectiveLabs/sdk-go/client/chain" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -450,7 +362,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -459,12 +371,15 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := &exchangetypes.MsgWithdraw{ + msg := exchangev2types.MsgWithdraw{ Sender: senderAddress.String(), SubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", Amount: sdktypes.Coin{ @@ -473,24 +388,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -498,19 +405,19 @@ func main() { ``` - - - -
ParameterTypeDescriptionRequired
senderStringThe address doing the withdrawYes
subaccount_idStringSubaccount ID to withdraw funds fromYes
amountCoinThe token amount to depositYes
+ + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
subaccount_idstringthe subaccount ID to withdraw funds fromYes
amounttypes.Cointhe amount of the withdrawal (in chain format)Yes

**Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -532,75 +439,38 @@ DEBU[0004] gas wanted: 129606 fn=func1 src="client/ch gas fee: 0.000064803 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -611,26 +481,24 @@ gas fee: 0.000064803 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os -from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -638,13 +506,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) dest_subaccount_id = address.get_subaccount_id(index=1) @@ -653,52 +530,19 @@ async def main() -> None: sender=address.to_acc_bech32(), source_subaccount_id=subaccount_id, destination_subaccount_id=dest_subaccount_id, - amount=Decimal(100), - denom="INJ", + amount=100, + denom="inj", ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -706,12 +550,14 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" @@ -719,15 +565,16 @@ import ( "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -758,7 +605,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -767,12 +614,15 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := &exchangetypes.MsgSubaccountTransfer{ + msg := exchangev2types.MsgSubaccountTransfer{ Sender: senderAddress.String(), SourceSubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", DestinationSubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000001", @@ -782,24 +632,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -807,20 +649,20 @@ func main() { ``` - - - - -
ParameterTypeDescriptionRequired
senderStringThe sender's addressYes
source_subaccount_idStringSubaccount ID from where the funds are deductedYes
destination_subaccount_idStringSubaccount ID the funds are deposited intoYes
amountCoinThe transfer token amountYes
+ + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
source_subaccount_idstringthe source subaccount IDYes
destination_subaccount_idstringthe destination subaccount IDYes
amounttypes.Cointhe amount to transfer (in chain format)Yes

**Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -842,75 +684,38 @@ DEBU[0003] gas wanted: 122103 fn=func1 src="client/ch gas fee: 0.0000610515 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -921,26 +726,24 @@ gas fee: 0.0000610515 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os -from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -948,13 +751,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) dest_subaccount_id = "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000" @@ -963,52 +775,19 @@ async def main() -> None: sender=address.to_acc_bech32(), source_subaccount_id=subaccount_id, destination_subaccount_id=dest_subaccount_id, - amount=Decimal(100), - denom="INJ", + amount=100, + denom="inj", ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -1016,12 +795,14 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" @@ -1029,15 +810,16 @@ import ( "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1068,7 +850,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1077,12 +859,15 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := &exchangetypes.MsgExternalTransfer{ + msg := exchangev2types.MsgExternalTransfer{ Sender: senderAddress.String(), SourceSubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", DestinationSubaccountId: "0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", @@ -1092,24 +877,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1117,20 +894,20 @@ func main() { ``` - - - - -
ParameterTypeDescriptionRequired
senderStringThe sender's addressYes
source_subaccount_idStringSubaccount ID from where the funds are deductedYes
destination_subaccount_idStringSubaccount ID the funds are deposited intoYes
amountCoinThe transfer token amountYes
+ + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
source_subaccount_idstringthe source subaccount IDYes
destination_subaccount_idstringthe destination subaccount IDYes
amounttypes.Cointhe amount to transfer (in chain format)Yes

**Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -1152,75 +929,38 @@ DEBU[0005] gas wanted: 122397 fn=func1 src="client/ch gas fee: 0.0000611985 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1231,26 +971,26 @@ gas fee: 0.0000611985 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os +from decimal import Decimal import dotenv import requests -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -1258,13 +998,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare msg asset = "injective-protocol" @@ -1272,58 +1021,27 @@ async def main() -> None: token_price = requests.get(coingecko_endpoint).json()[asset]["usd"] minimum_bridge_fee_usd = 10 bridge_fee = minimum_bridge_fee_usd / token_price + token_decimals = 6 + chain_bridge_fee = int(Decimal(str(bridge_fee)) * Decimal(f"1e{token_decimals}")) # prepare tx msg - msg = composer.MsgSendToEth( + msg = composer.msg_send_to_eth( sender=address.to_acc_bech32(), - denom="INJ", + denom="inj", eth_dest="0xaf79152ac5df276d9a8e1e2e22822f9713474902", amount=23, - bridge_fee=bridge_fee, + bridge_fee=chain_bridge_fee, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -1331,28 +1049,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" "cosmossdk.io/math" "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" peggytypes "github.com/InjectiveLabs/sdk-go/chain/peggy/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - sdktypes "github.com/cosmos/cosmos-sdk/types" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1383,7 +1104,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1392,7 +1113,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1406,7 +1130,7 @@ func main() { Denom: "inj", Amount: math.NewInt(2000000000000000000), // 2 INJ } - msg := &peggytypes.MsgSendToEth{ + msg := peggytypes.MsgSendToEth{ Sender: senderAddress.String(), Amount: amount, EthDest: ethDest, @@ -1414,24 +1138,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1450,9 +1166,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -1474,75 +1190,38 @@ DEBU[0004] gas wanted: 161907 fn=func1 src="client/ch gas fee: 0.0000809535 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1554,8 +1233,8 @@ gas fee: 0.0000809535 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -1643,19 +1322,19 @@ Transaction hash: 0xb538abc7c2f893a2fe24c7a8ea606ff48d980a754499f1bec89b862c2bcb ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network async def main() -> None: - network = Network.testnet() + network = Network.devnet() client = AsyncClient(network) - tx_hash = "D265527E3171C47D01D7EC9B839A95F8F794D4E683F26F5564025961C96EFDDA" + tx_hash = "EA598BB5297341636DD62D378DEB87ECE6F95AFB4F45966AA6A53D36EF022DA5" tx_logs = await client.fetch_tx(hash=tx_hash) print(tx_logs) @@ -1665,8 +1344,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1687,7 +1366,7 @@ import ( func main() { // network := common.LoadNetwork("mainnet", "k8s") network := common.LoadNetwork("mainnet", "lb") - tmRPC, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmRPC, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) @@ -1719,7 +1398,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmRPC) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2504,9 +2183,9 @@ txhash: A2B2B971C690AE7977451D24D6F450AECE6BCCB271E91E32C2563342DDA5254B **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int

@@ -2522,67 +2201,30 @@ txhash: A2B2B971C690AE7977451D24D6F450AECE6BCCB271E91E32C2563342DDA5254B **TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -2592,8 +2234,8 @@ txhash: A2B2B971C690AE7977451D24D6F450AECE6BCCB271E91E32C2563342DDA5254B > Request Example: - - + + ```py import asyncio import base64 @@ -2608,8 +2250,8 @@ async def main() -> None: network = Network.mainnet() event_filter = ( "tm.event='Tx' AND message.sender='inj1rwv4zn3jptsqs7l8lpa3uvzhs57y8duemete9e' " - "AND message.action='/injective.exchange.v1beta1.MsgBatchUpdateOrders' " - "AND injective.exchange.v1beta1.EventOrderFail.flags EXISTS" + "AND message.action='/injective.exchange.v2.MsgBatchUpdateOrders' " + "AND injective.exchange.v2.EventOrderFail.flags EXISTS" ) query = json.dumps( { @@ -2629,8 +2271,8 @@ async def main() -> None: if result == {}: continue - failed_order_hashes = json.loads(result["events"]["injective.exchange.v1beta1.EventOrderFail.hashes"][0]) - failed_order_codes = json.loads(result["events"]["injective.exchange.v1beta1.EventOrderFail.flags"][0]) + failed_order_hashes = json.loads(result["events"]["injective.exchange.v2.EventOrderFail.hashes"][0]) + failed_order_codes = json.loads(result["events"]["injective.exchange.v2.EventOrderFail.flags"][0]) dict = {} for i, order_hash in enumerate(failed_order_hashes): @@ -2645,8 +2287,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2671,7 +2313,7 @@ func main() { panic(err) } - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), diff --git a/source/includes/_accountsrpc.md b/source/includes/_accountsrpc.md index 04f97564..4d30c65d 100644 --- a/source/includes/_accountsrpc.md +++ b/source/includes/_accountsrpc.md @@ -11,21 +11,22 @@ Get a list of subaccounts for a specific address. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) account_address = "inj1clw20s2uxeyxtam6f7m84vgae92s9eh7vygagt" subacc_list = await client.fetch_subaccounts_list(account_address) - print(subacc_list) + print(json.dumps(subacc_list, indent=2)) if __name__ == "__main__": @@ -33,8 +34,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -61,7 +62,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -109,19 +110,20 @@ Get the subaccount's transfer history. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount = "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000" denom = "inj" transfer_types = ["withdraw", "deposit"] @@ -135,7 +137,7 @@ async def main() -> None: transfer_types=transfer_types, pagination=pagination, ) - print(subacc_history) + print(json.dumps(subacc_history, indent=2)) if __name__ == "__main__": @@ -143,8 +145,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -185,7 +187,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -328,22 +330,23 @@ Get the balance of a subaccount for a specific denom. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount_id = "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000" denom = "inj" balance = await client.fetch_subaccount_balance(subaccount_id=subaccount_id, denom=denom) - print(balance) + print(json.dumps(balance, indent=2)) if __name__ == "__main__": @@ -351,8 +354,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -380,7 +383,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -458,22 +461,23 @@ List the subaccount's balances for all denoms. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount = "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000" denoms = ["inj", "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5"] subacc_balances_list = await client.fetch_subaccount_balances_list(subaccount_id=subaccount, denoms=denoms) - print(subacc_balances_list) + print(json.dumps(subacc_balances_list, indent=2)) if __name__ == "__main__": @@ -481,8 +485,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -509,7 +513,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -618,25 +622,26 @@ Get a summary of the subaccount's active/unfilled orders. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount = "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000" order_direction = "buy" market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" subacc_order_summary = await client.fetch_subaccount_order_summary( subaccount_id=subaccount, order_direction=order_direction, market_id=market_id ) - print(subacc_order_summary) + print(json.dumps(subacc_order_summary, indent=2)) if __name__ == "__main__": @@ -644,8 +649,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -725,16 +730,16 @@ Stream the subaccount's balance for all denoms. ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def balance_event_processor(event: Dict[str, Any]): @@ -751,7 +756,7 @@ def stream_closed_processor(): async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount_id = "0xc7dca7c15c364865f77a4fb67ab11dc95502e6fe000000000000000000000001" denoms = ["inj", "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5"] task = asyncio.get_event_loop().create_task( @@ -773,8 +778,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -812,7 +817,7 @@ func main() { fmt.Println(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -918,18 +923,19 @@ Get orders with an order hash. This request will return market orders and limit ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) spot_order_hashes = [ "0xce0d9b701f77cd6ddfda5dd3a4fe7b2d53ba83e5d6c054fb2e9e886200b7b7bb", "0x2e2245b5431638d76c6e0cc6268970418a1b1b7df60a8e94b8cf37eae6105542", @@ -941,7 +947,7 @@ async def main() -> None: orders = await client.fetch_order_states( spot_order_hashes=spot_order_hashes, derivative_order_hashes=derivative_order_hashes ) - print(orders) + print(json.dumps(orders, indent=2)) if __name__ == "__main__": @@ -949,8 +955,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -985,7 +991,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1101,21 +1107,22 @@ Get an overview of your portfolio. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) account_address = "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku" portfolio = await client.fetch_portfolio(account_address=account_address) - print(portfolio) + print(json.dumps(portfolio, indent=2)) if __name__ == "__main__": @@ -1123,8 +1130,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1151,7 +1158,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1307,22 +1314,23 @@ Get the rewards for Trade & Earn, the request will fetch all addresses for the l ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) account_address = "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku" epoch = -1 rewards = await client.fetch_rewards(account_address=account_address, epoch=epoch) - print(rewards) + print(json.dumps(rewards, indent=2)) if __name__ == "__main__": @@ -1330,8 +1338,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1366,7 +1374,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` diff --git a/source/includes/_auction.md b/source/includes/_auction.md index 030dec50..3341e2ee 100644 --- a/source/includes/_auction.md +++ b/source/includes/_auction.md @@ -9,25 +9,24 @@ Includes the message for placing bids in auctions. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -35,59 +34,35 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare tx msg - msg = composer.MsgBid(sender=address.to_acc_bech32(), round=16250, bid_amount=1) - - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + msg = composer.msg_bid(sender=address.to_acc_bech32(), round=16250, bid_amount=1) + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -95,12 +70,14 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" @@ -108,6 +85,7 @@ import ( "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" auctiontypes "github.com/InjectiveLabs/sdk-go/chain/auction/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" @@ -116,7 +94,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -147,7 +125,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -156,7 +134,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -166,31 +147,23 @@ func main() { Denom: "inj", Amount: math.NewInt(1000000000000000000), // 1 INJ } - msg := &auctiontypes.MsgBid{ + msg := auctiontypes.MsgBid{ Sender: senderAddress.String(), Round: round, BidAmount: bidAmount, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -208,9 +181,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -232,73 +205,36 @@ DEBU[0002] gas wanted: 152112 fn=func1 src="client/ch gas fee: 0.000076056 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_auctionsrpc.md b/source/includes/_auctionsrpc.md index 544be7fe..6a19a3d4 100644 --- a/source/includes/_auctionsrpc.md +++ b/source/includes/_auctionsrpc.md @@ -12,22 +12,23 @@ Get the details of a specific auction. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) bid_round = 31 auction = await client.fetch_auction(round=bid_round) - print(auction) + print(json.dumps(auction, indent=2)) if __name__ == "__main__": @@ -35,8 +36,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -63,7 +64,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -188,21 +189,22 @@ Get the details of previous auctions. > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) auctions = await client.fetch_auctions() - print(auctions) + print(json.dumps(auctions, indent=2)) if __name__ == "__main__": @@ -210,8 +212,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -237,7 +239,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -391,27 +393,26 @@ Returns the total amount of INJ burnt in auctions. > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main(): # Select network: testnet, mainnet, or local network = Network.testnet() - - # Initialize AsyncClient - client = AsyncClient(network) + client = IndexerClient(network) try: # Fetch INJ burnt amount inj_burnt_response = await client.fetch_inj_burnt() print("INJ Burnt Endpoint Response:") - print(inj_burnt_response) + print(json.dumps(inj_burnt_response, indent=2)) except Exception as e: print(f"Error fetching INJ burnt amount: {e}") @@ -422,8 +423,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -492,16 +493,16 @@ Stream live updates for auction bids. > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def bid_event_processor(event: Dict[str, Any]): @@ -519,7 +520,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) task = asyncio.get_event_loop().create_task( client.listen_bids_updates( @@ -538,8 +539,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -576,7 +577,7 @@ func main() { fmt.Println(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } diff --git a/source/includes/_authz.md b/source/includes/_authz.md index 9be4710c..17ac5fcf 100644 --- a/source/includes/_authz.md +++ b/source/includes/_authz.md @@ -11,25 +11,24 @@ There are two types of authorization, Generic and Typed. Generic authorization w ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") grantee_public_address = os.getenv("INJECTIVE_GRANTEE_PUBLIC_ADDRESS") # select network: local, testnet, mainnet @@ -38,28 +37,37 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # subaccount_id = address.get_subaccount_id(index=0) # market_ids = ["0x0511ddc4e6586f3bfe1acb2dd905f8b8a82c97e1edaef654b12ca7e6031ca0fa"] # prepare tx msg # GENERIC AUTHZ - msg = composer.MsgGrantGeneric( + msg = composer.msg_grant_generic( granter=address.to_acc_bech32(), grantee=grantee_public_address, - msg_type="/injective.exchange.v1beta1.MsgCreateSpotLimitOrder", + msg_type="/injective.exchange.v2.MsgCreateSpotLimitOrder", expire_in=31536000, # 1 year ) # TYPED AUTHZ - # msg = composer.MsgGrantTyped( + # msg = composer.msg_grant_typed( # granter = "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku", # grantee = "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r", # msg_type = "CreateSpotLimitOrderAuthz", @@ -68,48 +76,15 @@ async def main() -> None: # market_ids=market_ids # ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -117,17 +92,20 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" @@ -135,7 +113,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -166,7 +144,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -175,7 +153,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -199,24 +180,16 @@ func main() { ) // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -274,75 +247,38 @@ DEBU[0003] gas wanted: 117873 fn=func1 src="client/ch gas fee: 0.0000589365 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -353,27 +289,26 @@ gas fee: 0.0000589365 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import Address, PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_GRANTEE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_GRANTEE_PRIVATE_KEY") granter_inj_address = os.getenv("INJECTIVE_GRANTER_PUBLIC_ADDRESS") # select network: local, testnet, mainnet @@ -382,13 +317,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_for_grantee_account_using_gas_heuristics( + network=network, + grantee_private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare tx msg market_id = "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" @@ -396,7 +340,7 @@ async def main() -> None: granter_address = Address.from_acc_bech32(granter_inj_address) granter_subaccount_id = granter_address.get_subaccount_id(index=0) - msg0 = composer.msg_create_spot_limit_order( + message = composer.msg_create_spot_limit_order( sender=granter_inj_address, market_id=market_id, subaccount_id=granter_subaccount_id, @@ -407,58 +351,15 @@ async def main() -> None: cid=str(uuid.uuid4()), ) - msg = composer.MsgExec(grantee=grantee, msgs=[msg0]) - - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msgs = sim_res["result"]["msgResponses"] - data = sim_res_msgs[0] - unpacked_msg_res = composer.unpack_msg_exec_response( - underlying_msg_type=msg0.__class__.__name__, msg_exec_response=data - ) - print("simulation msg response") - print(unpacked_msg_res) + # broadcast the transaction + result = await message_broadcaster.broadcast([message]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) - # build tx gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -466,13 +367,14 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" @@ -480,17 +382,18 @@ import ( rpchttp "github.com/cometbft/cometbft/rpc/client/http" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" authztypes "github.com/cosmos/cosmos-sdk/x/authz" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -536,7 +439,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) txFactory := chainclient.NewTxFactory(clientCtx) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionTxFactory(&txFactory), @@ -546,17 +449,14 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - // note that we use grantee keyring to send the msg on behalf of granter here // sender, subaccount are from granter granter := granterAddress.String() @@ -567,20 +467,19 @@ func main() { amount := decimal.NewFromFloat(2) price := decimal.NewFromFloat(22.55) - order := chainClient.CreateSpotOrder( + order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, + OrderType: int32(exchangev2types.OrderType_BUY), Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, }, - marketsAssistant, ) // manually pack msg into Any type - msg0 := exchangetypes.MsgCreateSpotLimitOrder{ + msg0 := exchangev2types.MsgCreateSpotLimitOrder{ Sender: granter, Order: *order, } @@ -588,30 +487,22 @@ func main() { msg0Any := &codectypes.Any{} msg0Any.TypeUrl = sdk.MsgTypeURL(&msg0) msg0Any.Value = msg0Bytes - msg := &authztypes.MsgExec{ + msg := authztypes.MsgExec{ Grantee: grantee, Msgs: []*codectypes.Any{msg0Any}, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -647,75 +538,38 @@ DEBU[0004] gas wanted: 133972 fn=func1 src="client/ch gas fee: 0.000066986 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -727,25 +581,24 @@ gas fee: 0.000066986 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") grantee_public_address = os.getenv("INJECTIVE_GRANTEE_PUBLIC_ADDRESS") # select network: local, testnet, mainnet @@ -754,63 +607,39 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare tx msg - msg = composer.MsgRevoke( + msg = composer.msg_revoke( granter=address.to_acc_bech32(), grantee=grantee_public_address, - msg_type="/injective.exchange.v1beta1.MsgCreateSpotLimitOrder", + msg_type="/injective.exchange.v2.MsgCreateSpotLimitOrder", ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -818,17 +647,20 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" authztypes "github.com/cosmos/cosmos-sdk/x/authz" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" @@ -837,7 +669,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -868,7 +700,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -877,7 +709,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -885,31 +720,23 @@ func main() { grantee := "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r" msgType := "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder" - msg := &authztypes.MsgRevoke{ + msg := authztypes.MsgRevoke{ Granter: senderAddress.String(), Grantee: grantee, MsgTypeUrl: msgType, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -941,75 +768,38 @@ DEBU[0003] gas wanted: 103153 fn=func1 src="client/ch gas fee: 0.0000515765 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1022,15 +812,16 @@ Get the details of an authorization between a granter and a grantee. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1041,9 +832,9 @@ async def main() -> None: network = Network.testnet() client = AsyncClient(network) - msg_type_url = "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder" + msg_type_url = "/injective.exchange.v2.MsgCreateDerivativeLimitOrder" authorizations = await client.fetch_grants(granter=granter, grantee=grantee, msg_type_url=msg_type_url) - print(authorizations) + print(json.dumps(authorizations, indent=2)) if __name__ == "__main__": @@ -1051,14 +842,13 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" - "encoding/json" "fmt" "github.com/InjectiveLabs/sdk-go/client" @@ -1073,7 +863,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1104,7 +894,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1128,12 +918,15 @@ func main() { res, err := chainClient.GetAuthzGrants(ctx, req) if err != nil { - fmt.Println(err) + panic(err) } - str, _ := json.MarshalIndent(res, "", " ") - fmt.Print(string(str)) + jsonResponse, err := clientCtx.Codec.MarshalJSON(res) + if err != nil { + panic(err) + } + fmt.Print(string(jsonResponse)) } ``` diff --git a/source/includes/_bank.md b/source/includes/_bank.md index 08e001d9..c59ac9d3 100644 --- a/source/includes/_bank.md +++ b/source/includes/_bank.md @@ -9,25 +9,24 @@ Bank module. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -35,64 +34,40 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare tx msg - msg = composer.MsgSend( + msg = composer.msg_send( from_address=address.to_acc_bech32(), to_address="inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r", - amount=0.000000000000000001, - denom="INJ", + amount=100000000000000000, + denom="inj", ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -100,12 +75,14 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" @@ -113,6 +90,7 @@ import ( "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" @@ -121,7 +99,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -151,7 +129,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -160,13 +138,16 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) // prepare tx msg - msg := &banktypes.MsgSend{ + msg := banktypes.MsgSend{ FromAddress: senderAddress.String(), ToAddress: "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r", Amount: []sdktypes.Coin{{ @@ -175,24 +156,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -227,75 +200,38 @@ DEBU[0004] gas wanted: 119871 fn=func1 src="client/ch gas fee: 0.0000599355 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -306,12 +242,14 @@ gas fee: 0.0000599355 INJ ### Request Parameters > Request Example: - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" @@ -319,6 +257,7 @@ import ( "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" @@ -327,7 +266,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -360,7 +299,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -369,14 +308,17 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) // prepare tx msg - msg := &banktypes.MsgMultiSend{ + msg := banktypes.MsgMultiSend{ Inputs: []banktypes.Input{ { Address: senderAddress.String(), @@ -408,24 +350,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -481,12 +415,13 @@ Get the bank balance for all denoms. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -495,7 +430,7 @@ async def main() -> None: client = AsyncClient(network) address = "inj1cml96vmptgw99syqrrz8az79xer2pcgp0a885r" all_bank_balances = await client.fetch_bank_balances(address=address) - print(all_bank_balances) + print(json.dumps(all_bank_balances, indent=2)) if __name__ == "__main__": @@ -503,8 +438,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -523,7 +458,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -554,7 +489,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -569,10 +504,10 @@ func main() { res, err := chainClient.GetBankBalances(ctx, address) if err != nil { - fmt.Println(err) + panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -681,12 +616,13 @@ Get the bank balance for a specific denom. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -696,7 +632,7 @@ async def main() -> None: address = "inj1cml96vmptgw99syqrrz8az79xer2pcgp0a885r" denom = "inj" bank_balance = await client.fetch_bank_balance(address=address, denom=denom) - print(bank_balance) + print(json.dumps(bank_balance, indent=2)) if __name__ == "__main__": @@ -704,8 +640,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -725,7 +661,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -756,7 +692,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -775,7 +711,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -831,12 +767,13 @@ Get the bank spendable balances for a specific address. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -845,7 +782,7 @@ async def main() -> None: client = AsyncClient(network) address = "inj1cml96vmptgw99syqrrz8az79xer2pcgp0a885r" spendable_balances = await client.fetch_spendable_balances(address=address) - print(spendable_balances) + print(json.dumps(spendable_balances, indent=2)) if __name__ == "__main__": @@ -853,8 +790,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -875,7 +812,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -906,7 +843,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -925,7 +862,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1070,12 +1007,13 @@ Get the bank spendable balances for a specific address and denom. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1085,7 +1023,7 @@ async def main() -> None: address = "inj1cml96vmptgw99syqrrz8az79xer2pcgp0a885r" denom = "inj" spendable_balances = await client.fetch_spendable_balances_by_denom(address=address, denom=denom) - print(spendable_balances) + print(json.dumps(spendable_balances, indent=2)) if __name__ == "__main__": @@ -1093,8 +1031,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1113,7 +1051,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1144,7 +1082,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1163,7 +1101,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1220,12 +1158,13 @@ Get the total supply for all tokens ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1236,7 +1175,7 @@ async def main() -> None: total_supply = await client.fetch_total_supply( pagination=PaginationOption(limit=10), ) - print(total_supply) + print(json.dumps(total_supply, indent=2)) if __name__ == "__main__": @@ -1244,8 +1183,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1266,7 +1205,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1297,7 +1236,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1315,7 +1254,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1455,12 +1394,13 @@ Queries the supply of a single token ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1468,7 +1408,7 @@ async def main() -> None: network = Network.testnet() client = AsyncClient(network) supply_of = await client.fetch_supply_of(denom="inj") - print(supply_of) + print(json.dumps(supply_of, indent=2)) if __name__ == "__main__": @@ -1476,8 +1416,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1496,7 +1436,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1527,7 +1467,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1545,7 +1485,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1596,12 +1536,13 @@ Queries the metadata of a single token ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1610,7 +1551,7 @@ async def main() -> None: client = AsyncClient(network) denom = "factory/inj107aqkjc3t5r3l9j4n9lgrma5tm3jav8qgppz6m/position" metadata = await client.fetch_denom_metadata(denom=denom) - print(metadata) + print(json.dumps(metadata, indent=2)) if __name__ == "__main__": @@ -1618,8 +1559,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1638,7 +1579,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1669,7 +1610,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1687,7 +1628,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1767,12 +1708,13 @@ Queries the metadata of all tokens ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1783,7 +1725,7 @@ async def main() -> None: denoms = await client.fetch_denoms_metadata( pagination=PaginationOption(limit=10), ) - print(denoms) + print(json.dumps(denoms, indent=2)) if __name__ == "__main__": @@ -1791,8 +1733,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1813,7 +1755,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1844,7 +1786,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1862,7 +1804,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2186,12 +2128,13 @@ Queries for all account addresses that own a particular token ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -2204,7 +2147,7 @@ async def main() -> None: denom=denom, pagination=PaginationOption(limit=10), ) - print(owners) + print(json.dumps(owners, indent=2)) if __name__ == "__main__": @@ -2212,8 +2155,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2233,7 +2176,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2264,7 +2207,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2283,7 +2226,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2425,12 +2368,13 @@ This query only returns denominations that have specific SendEnabled settings. A ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -2443,7 +2387,7 @@ async def main() -> None: denoms=[denom], pagination=PaginationOption(limit=10), ) - print(enabled) + print(json.dumps(enabled, indent=2)) if __name__ == "__main__": @@ -2451,8 +2395,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2460,19 +2404,19 @@ import ( "context" "encoding/json" "fmt" + "os" - "github.com/InjectiveLabs/sdk-go/client" - chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - "github.com/InjectiveLabs/sdk-go/client/common" rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/types/query" - "os" + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2503,7 +2447,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2522,7 +2466,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } diff --git a/source/includes/_binaryoptions.md b/source/includes/_binaryoptions.md index 3f677da1..656ed52d 100644 --- a/source/includes/_binaryoptions.md +++ b/source/includes/_binaryoptions.md @@ -11,12 +11,12 @@ Retrieves binary options markets ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -36,8 +36,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -56,7 +56,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -87,7 +87,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -106,15 +106,15 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` - -
ParameterTypeDescriptionRequired
statusStringMarket statusNo
+ +
ParameterTypeDescriptionRequired
statusstringStatus of the market, for convenience it is set to string - not enumYes
### Response Parameters @@ -122,48 +122,85 @@ func main() { ``` json { - "markets":[ - - ] + "markets": [ + { + "ticker": "TIA/USDT PERP", + "oracle_symbol": "TIA/USDT PERP", + "oracle_provider": "Frontrunner", + "oracle_type": 11, + "expiration_timestamp": 17115165000022, + "settlement_timestamp": 17115201000022, + "admin": "inj1xyfrl7wrsczv7ah5tvvpcwnp3vlc3n9terc9d6", + "quote_denom": "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", + "market_id": "0x5cced3de7c6df18b87d94b18f4b2065f8efcac44c3abecf3f2ed489af8c0c15e", + "maker_fee_rate": "0.000500000000000000", + "taker_fee_rate": "0.001000000000000000", + "relayer_fee_share_rate": "0.400000000000000000", + "status": 1, + "min_price_tick_size": "0.000000010000000000", + "min_quantity_tick_size": "0.010000000000000000", + "min_notional": "0.000000000000000000", + "quote_decimals": 6 + }, + { + "ticker": "INJ/USDT", + "oracle_symbol": "INJ/USDT", + "oracle_provider": "Frontrunner", + "oracle_type": 11, + "expiration_timestamp": 17116342000091, + "settlement_timestamp": 17116378000091, + "admin": "inj1xyfrl7wrsczv7ah5tvvpcwnp3vlc3n9terc9d6", + "quote_denom": "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", + "market_id": "0xddd038d16922db1671a998285e387f016ad302a6643732fcac93dc42ac927e39", + "maker_fee_rate": "0.000500000000000000", + "taker_fee_rate": "0.001000000000000000", + "relayer_fee_share_rate": "0.400000000000000000", + "status": 1, + "min_price_tick_size": "0.000000010000000000", + "min_quantity_tick_size": "0.010000000000000000", + "min_notional": "0.000000000000000000", + "quote_decimals": 6 + } + ] } ``` - -
ParameterTypeDescription
marketsBinaryOptionsMarket ArrayList of binary options markets
+ +
ParameterTypeDescription
marketsBinaryOptionsMarket array

**BinaryOptionsMarket** - - - - - - - - - - - - - - + +
ParameterTypeDescription
tickerStringName of the pair in format AAA/BBB, where AAA is base asset, BBB is quote asset
oracle_symbolStringOracle symbol
oracle_providerStringOracle provider
oracle_typeOracleTypeThe oracle type
oracle_scale_factorIntegerThe oracle number of scale decimals
expiration_timestampIntegerThe market expiration timestamp
settlement_timestampIntegerThe market settlement timestamp
adminStringThe market's admin address
quote_denomStringCoin denom used for the quote asset
market_idStringThe market ID
maker_fee_rateDecimalFee percentage makers pay when trading
taker_fee_rateDecimalFee percentage takers pay when trading
relayer_fee_share_rateDecimalPercentage of the transaction fee shared with the relayer in a derivative market
+ + + + + + + + + + + + - - - - - -
ParameterTypeDescription
tickerstringTicker for the derivative contract.
oracle_symbolstringOracle symbol
oracle_providerstringOracle Provider
oracle_typetypes.OracleTypeOracle type
oracle_scale_factoruint32Scale factor for oracle prices.
expiration_timestampint64expiration timestamp
settlement_timestampint64expiration timestamp
adminstringadmin of the market
quote_denomstringAddress of the quote currency denomination for the binary options contract
market_idstringUnique market ID.
maker_fee_ratecosmossdk_io_math.LegacyDecmaker_fee_rate defines the maker fee rate of a binary options market
taker_fee_ratecosmossdk_io_math.LegacyDectaker_fee_rate defines the taker fee rate of a derivative market
relayer_fee_share_ratecosmossdk_io_math.LegacyDecrelayer_fee_share_rate defines the percentage of the transaction fee shared with the relayer in a derivative market
statusMarketStatusStatus of the market
min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market
min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market
settlement_priceDecimalThe market's settlement price
min_notionalDecimalMinimum notional (in quote asset) required for orders in the market
admin_permissionsIntegerLevel of admin permissions (the permission number is a result of adding up all individual permissions numbers)
quote_decimalsIntegerNumber of decimals used for the quote token
+min_price_tick_sizecosmossdk_io_math.LegacyDecmin_price_tick_size defines the minimum tick size that the price and margin required for orders in the market (in human readable format) +min_quantity_tick_sizecosmossdk_io_math.LegacyDecmin_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market (in human readable format) +settlement_pricecosmossdk_io_math.LegacyDecsettlement_price defines the settlement price of the binary options market (in human readable format) +min_notionalcosmossdk_io_math.LegacyDecmin_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format) +admin_permissionsuint32level of admin permissions +quote_decimalsuint32quote token decimals
**OracleType** - + @@ -175,14 +212,15 @@ func main() { -
CodeName
0Unspecified
1Band
2PriceFeed
8Uma
9Pyth
10BandIBC
11Provider
+11Provider +12Stork
**AdminPermission** - + @@ -191,20 +229,30 @@ func main() {
CodeName
1Ticker Permission
2Min Price Tick Size Permission
4Min Quantity Tick Size Permission
32Maintenance Margin Ratio Permission
- - + +## MsgInstantBinaryOptionsMarketLaunch + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" @@ -212,7 +260,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -243,7 +291,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -251,7 +299,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -259,10 +310,7 @@ func main() { minPriceTickSize := math.LegacyMustNewDecFromStr("0.01") minQuantityTickSize := math.LegacyMustNewDecFromStr("0.001") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - chainMinQuantityTickSize := minQuantityTickSize - - msg := &exchangetypes.MsgInstantBinaryOptionsMarketLaunch{ + msg := &exchangev2types.MsgInstantBinaryOptionsMarketLaunch{ Sender: senderAddress.String(), Ticker: "UFC-KHABIB-TKO-05/30/2023", OracleSymbol: "UFC-KHABIB-TKO-05/30/2023", @@ -275,21 +323,21 @@ func main() { SettlementTimestamp: 1690730982, Admin: senderAddress.String(), QuoteDenom: "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7", - MinPriceTickSize: chainMinPriceTickSize, - MinQuantityTickSize: chainMinQuantityTickSize, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -297,29 +345,29 @@ func main() { ``` - - - - - - - - - - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe market launch requestor addressYes
tickerStringTicker for the binary options marketYes
oracle_symbolStringOracle symbolYes
oracle_providerStringOracle providerYes
oracle_typeOracleTypeThe oracle typeYes
oracle_scale_factorIntegerScale factor for oracle pricesYes
maker_fee_rateDecimalDefines the trade fee rate for makers on the perpetual marketYes
taker_fee_rateDecimalDefines the trade fee rate for takers on the perpetual marketYes
expiration_timestampIntegerThe market's expiration time in secondsYes
settlement_timestampIntegerThe market's settlement time in secondsYes
adminStringThe market's admin addressYes
quote_denomStringQuote tocken denomYes
min_price_tick_sizeDecimalDefines the minimum tick size of the order's priceYes
min_quantity_tick_sizeDecimalDefines the minimum tick size of the order's quantityYes
min_notionalDecimalDefines the minimum notional (in quote asset) required for orders in the marketYes
+ + + + + + + + + + + + + + + +
ParameterTypeDescriptionRequired
senderstringYes
tickerstringTicker for the derivative contract.Yes
oracle_symbolstringOracle symbolYes
oracle_providerstringOracle ProviderYes
oracle_typetypes1.OracleTypeOracle typeYes
oracle_scale_factoruint32Scale factor for oracle prices.Yes
maker_fee_ratecosmossdk_io_math.LegacyDecmaker_fee_rate defines the trade fee rate for makers on the perpetual marketYes
taker_fee_ratecosmossdk_io_math.LegacyDectaker_fee_rate defines the trade fee rate for takers on the perpetual marketYes
expiration_timestampint64expiration timestampYes
settlement_timestampint64expiration timestampYes
adminstringadmin of the marketYes
quote_denomstringAddress of the quote currency denomination for the binary options contractYes
min_price_tick_sizecosmossdk_io_math.LegacyDecmin_price_tick_size defines the minimum tick size that the price and margin required for orders in the market (in human readable format)Yes
min_quantity_tick_sizecosmossdk_io_math.LegacyDecmin_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market (in human readable format)Yes
min_notionalcosmossdk_io_math.LegacyDecmin_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)Yes

**OracleType** - + @@ -331,7 +379,8 @@ func main() { -
CodeName
0Unspecified
1Band
2PriceFeed
8Uma
9Pyth
10BandIBC
11Provider
+11Provider +12Stork ### Response Parameters @@ -341,75 +390,38 @@ func main() { ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -420,28 +432,26 @@ func main() { ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction -from pyinjective.utils.denom import Denom from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -449,29 +459,28 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info market_id = "0x767e1542fbc111e88901e223e625a4a8eb6d630c96884bbde672e8bc874075bb" fee_recipient = "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r" - # set custom denom to bypass ini file load (optional) - denom = Denom( - description="desc", - base=0, - quote=6, - min_price_tick_size=1000, - min_quantity_tick_size=0.0001, - min_notional=0, - ) - # prepare tx msg msg = composer.msg_create_binary_options_limit_order( sender=address.to_acc_bech32(), @@ -483,56 +492,17 @@ async def main() -> None: margin=Decimal("0.5"), order_type="BUY", cid=str(uuid.uuid4()), - denom=denom, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -540,40 +510,41 @@ if __name__ == "__main__": ``` - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
orderDerivativeOrderOrder's parametersYes
+ + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
orderDerivativeOrderthe order detailsYes

**DerivativeOrder** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
marginDecimalThe margin amount used by the orderYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -606,75 +577,38 @@ gas fee: 0.0000606245 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -685,27 +619,26 @@ gas fee: 0.0000606245 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -713,13 +646,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -739,53 +681,16 @@ async def main() -> None: ), cid=str(uuid.uuid4()), ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -793,40 +698,41 @@ if __name__ == "__main__": ``` - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
orderDerivativeOrderOrder's parametersYes
+ + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
orderDerivativeOrderthe order detailsYes

**DerivativeOrder** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
marginDecimalThe margin amount used by the orderYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -859,75 +765,38 @@ gas fee: 0.0000539515 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -938,25 +807,24 @@ gas fee: 0.0000539515 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -964,13 +832,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -979,55 +856,24 @@ async def main() -> None: # prepare tx msg msg = composer.msg_cancel_binary_options_order( - sender=address.to_acc_bech32(), market_id=market_id, subaccount_id=subaccount_id, order_hash=order_hash - ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) + sender=address.to_acc_bech32(), + market_id=market_id, + subaccount_id=subaccount_id, + order_hash=order_hash, + is_buy=True, + is_market_order=False, + is_conditional=False, ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -1035,28 +881,28 @@ if __name__ == "__main__": ``` - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
market_idStringThe unique ID of the order's marketYes
subaccount_idStringThe subaccount ID the order belongs toYes
order_hashStringThe order hash (either order_hash or cid have to be provided)No
order_maskOrderMaskThe order mask that specifies the order typeNo
cidStringThe client order ID provided by the creator (either order_hash or cid have to be provided)No
+ + + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
market_idstringthe market IDYes
subaccount_idstringthe subaccount IDYes
order_hashstringthe order hash (optional)No
order_maskint32the order mask (bitwise combination of OrderMask enum values) (optional)No
cidstringthe client order ID (optional)No

**OrderMask** - - - - - - - - -
CodeName
0OrderMask_UNUSED
1OrderMask_ANY
2OrderMask_REGULAR
4OrderMask_CONDITIONAL
8OrderMask_BUY_OR_HIGHER
16OrderMask_SELL_OR_LOWER
32OrderMask_MARKET
64OrderMask_LIMIT
+ + + + + + + + +
CodeName
0UNUSED
1ANY
2REGULAR
4CONDITIONAL
8DIRECTION_BUY_OR_HIGHER
16DIRECTION_SELL_OR_LOWER
32TYPE_MARKET
64TYPE_LIMIT
### Response Parameters @@ -1075,75 +921,38 @@ gas fee: 0.0000556515 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1154,26 +963,25 @@ gas fee: 0.0000556515 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -1181,13 +989,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare trade info market_id = "0xfafec40a7b93331c1fc89c23f66d11fbb48f38dfdd78f7f4fc4031fad90f6896" @@ -1206,53 +1023,15 @@ async def main() -> None: status=status, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -1260,20 +1039,20 @@ if __name__ == "__main__": ``` - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe market launch requestor addressYes
market_idStringThe unique market IDYes
settlement_priceDecimalThe price at which market will be settledNo
expiration_timestampIntegerThe market's expiration time in secondsYes
settlement_timestampIntegerThe market's settlement time in secondsYes
market_statusMarketStatusThe market statusYes
+ + + + + + +
ParameterTypeDescriptionRequired
senderstringThe sender's Injective addressYes
market_idstringThe market IDYes
settlement_pricecosmossdk_io_math.LegacyDecnew price at which market will be settledNo
expiration_timestampint64expiration timestampYes
settlement_timestampint64expiration timestampYes
statusMarketStatusStatus of the marketYes

**MarketStatus** - + @@ -1297,75 +1076,38 @@ gas fee: 0.0000556515 INJ ``` - -
CodeName
0Unspecified
1Active
2Paused
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1383,27 +1125,26 @@ Further note that if no marketIDs are provided in the SpotMarketIdsToCancelAll o ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -1411,13 +1152,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -1432,12 +1182,12 @@ async def main() -> None: spot_market_id_cancel_2 = "0x7a57e705bb4e09c88aecfc295569481dbf2fe1d5efe364651fbe72385938e9b0" derivative_orders_to_cancel = [ - composer.order_data( + composer.create_order_data_without_mask( market_id=derivative_market_id_cancel, subaccount_id=subaccount_id, order_hash="0x48690013c382d5dbaff9989db04629a16a5818d7524e027d517ccc89fd068103", ), - composer.order_data( + composer.create_order_data_without_mask( market_id=derivative_market_id_cancel_2, subaccount_id=subaccount_id, order_hash="0x7ee76255d7ca763c56b0eab9828fca89fdd3739645501c8a80f58b62b4f76da5", @@ -1445,12 +1195,12 @@ async def main() -> None: ] spot_orders_to_cancel = [ - composer.order_data( + composer.create_order_data_without_mask( market_id=spot_market_id_cancel, subaccount_id=subaccount_id, cid="0e5c3ad5-2cc4-4a2a-bbe5-b12697739163", ), - composer.order_data( + composer.create_order_data_without_mask( market_id=spot_market_id_cancel_2, subaccount_id=subaccount_id, order_hash="0x222daa22f60fe9f075ed0ca583459e121c23e64431c3fbffdedda04598ede0d2", @@ -1514,53 +1264,15 @@ async def main() -> None: spot_orders_to_cancel=spot_orders_to_cancel, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -1568,29 +1280,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1622,7 +1336,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1632,17 +1346,14 @@ func main() { return } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) smarketId := "0x0511ddc4e6586f3bfe1acb2dd905f8b8a82c97e1edaef654b12ca7e6031ca0fa" @@ -1650,17 +1361,16 @@ func main() { sprice := decimal.NewFromFloat(22.5) smarketIds := []string{"0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0"} - spot_order := chainClient.CreateSpotOrder( + spot_order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: int32(exchangev2types.OrderType_BUY), //BUY SELL BUY_PO SELL_PO Quantity: samount, Price: sprice, FeeRecipient: senderAddress.String(), MarketId: smarketId, Cid: uuid.NewString(), }, - marketsAssistant, ) dmarketId := "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce" @@ -1669,10 +1379,10 @@ func main() { dleverage := decimal.RequireFromString("2") dmarketIds := []string{"0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce"} - derivative_order := chainClient.CreateDerivativeOrder( + derivative_order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: int32(exchangev2types.OrderType_BUY), //BUY SELL BUY_PO SELL_PO Quantity: damount, Price: dprice, Leverage: dleverage, @@ -1681,51 +1391,28 @@ func main() { IsReduceOnly: false, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgBatchUpdateOrders) - msg.Sender = senderAddress.String() - msg.SubaccountId = defaultSubaccountID.Hex() - msg.SpotOrdersToCreate = []*exchangetypes.SpotOrder{spot_order} - msg.DerivativeOrdersToCreate = []*exchangetypes.DerivativeOrder{derivative_order} - msg.SpotMarketIdsToCancelAll = smarketIds - msg.DerivativeMarketIdsToCancelAll = dmarketIds - - simRes, err := chainClient.SimulateMsg(clientCtx, msg) - - if err != nil { - fmt.Println(err) - return + msg := exchangev2types.MsgBatchUpdateOrders{ + Sender: senderAddress.String(), + SubaccountId: defaultSubaccountID.Hex(), + SpotOrdersToCreate: []*exchangev2types.SpotOrder{spot_order}, + DerivativeOrdersToCreate: []*exchangev2types.DerivativeOrder{derivative_order}, + SpotMarketIdsToCancelAll: smarketIds, + DerivativeMarketIdsToCancelAll: dmarketIds, } - MsgBatchUpdateOrdersResponse := exchangetypes.MsgBatchUpdateOrdersResponse{} - MsgBatchUpdateOrdersResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) - - fmt.Println("simulated spot order hashes", MsgBatchUpdateOrdersResponse.SpotOrderHashes) - - fmt.Println("simulated derivative order hashes", MsgBatchUpdateOrdersResponse.DerivativeOrderHashes) - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1733,87 +1420,89 @@ func main() { ``` - - - - - - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
subaccount_idStringThe subaccount ID is only used for the spot_market_ids_to_cancel_all and derivative_market_ids_to_cancel_allNo
spot_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
derivative_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
spot_orders_to_cancelOrderData ArrayList of spot orders to be cancelledNo
derivative_orders_to_cancelOrderData ArrayList of derivative orders to be cancelledNo
spot_orders_to_createSpotOrder ArrayList of spot orders to be createdNo
derivative_orders_to_createDerivativeOrder ArrayList of derivative orders to be createdNo
binary_options_orders_to_cancelOrderData ArrayList of binary options orders to be cancelledNo
binary_options_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
binary_options_orders_to_createDerivativeOrder ArrayList of binary options orders to be createdNo
+ + + + + + + + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
subaccount_idstringsubaccount_id only used for the spot_market_ids_to_cancel_all and derivative_market_ids_to_cancel_all (optional)No
spot_market_ids_to_cancel_allstring arraythe market IDs to cancel all spot orders for (optional)No
derivative_market_ids_to_cancel_allstring arraythe market IDs to cancel all derivative orders for (optional)No
spot_orders_to_cancelOrderData arraythe spot orders to cancelNo
derivative_orders_to_cancelOrderData arraythe derivative orders to cancelNo
spot_orders_to_createSpotOrder arraythe spot orders to createNo
derivative_orders_to_createDerivativeOrder arraythe derivative orders to createNo
binary_options_orders_to_cancelOrderData arraythe binary options orders to cancelNo
binary_options_market_ids_to_cancel_allstring arraythe market IDs to cancel all binary options orders for (optional)No
binary_options_orders_to_createDerivativeOrder arraythe binary options orders to createNo

**OrderData** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe order's market IDYes
subaccount_idStringSubaccount ID that created the orderYes
order_hashStringThe order hash (either the order_hash or the cid should be provided)No
order_maskOrderMaskThe order mask that specifies the order typeNo
cidStringThe order's client order ID (either the order_hash or the cid should be provided)No
+ + + + + +
ParameterTypeDescription
market_idstringthe market ID
subaccount_idstringthe subaccount ID
order_hashstringthe order hash (optional - either the order_hash or the cid should be provided)
order_maskint32the order mask (bitwise combination of OrderMask enum values)
cidstringthe client order ID (optional - either the order_hash or the cid should be provided)

**SpotOrder** - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**DerivativeOrder** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
marginDecimalThe margin amount used by the orderYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderMask** - - - - - - - - -
CodeName
0OrderMask_UNUSED
1OrderMask_ANY
2OrderMask_REGULAR
4OrderMask_CONDITIONAL
8OrderMask_BUY_OR_HIGHER
16OrderMask_SELL_OR_LOWER
32OrderMask_MARKET
64OrderMask_LIMIT
+ + + + + + + + +
CodeName
0UNUSED
1ANY
2REGULAR
4CONDITIONAL
8DIRECTION_BUY_OR_HIGHER
16DIRECTION_SELL_OR_LOWER
32TYPE_MARKET
64TYPE_LIMIT

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -1859,73 +1548,36 @@ DEBU[0003] gas wanted: 659092 fn=func1 src="client/ch gas fee: 0.000329546 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_broadcaster.md b/source/includes/_broadcaster.md index 994183b0..a64517e6 100644 --- a/source/includes/_broadcaster.md +++ b/source/includes/_broadcaster.md @@ -14,8 +14,8 @@ To use the broadcaster you just need to create an instance of *MsgBroadcasterWit > Example - Calculate gas fee simulating the transaction: - - + + ```py import asyncio import json @@ -25,7 +25,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -166,8 +166,8 @@ This is the most common broadcaster configuration. Unless you are using grantee > Example - Calculate gas fee without simulation: - - + + ```py import asyncio import json @@ -177,7 +177,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -198,7 +198,7 @@ async def main() -> None: # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - message_broadcaster = MsgBroadcasterWithPk.new_without_simulation( + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( network=network, private_key=private_key_in_hexa, gas_price=gas_price, @@ -272,8 +272,8 @@ This is the required broadcaster configuration when operating with grantee accou > Example - Calculate gas fee simulating the transaction: - - + + ```py import asyncio import json @@ -283,7 +283,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import Address, PrivateKey @@ -404,8 +404,8 @@ For the broadcaster to calculate the gas fee running the simulation, create an i > Example - Calculate gas fee without simulation: - - + + ```py import asyncio import json @@ -415,7 +415,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import Address, PrivateKey @@ -487,14 +487,11 @@ For the broadcaster to calculate the gas fee based on the messages included with

---- - -**NOTE:** + ## Fine-tunning message based gas fee estimation diff --git a/source/includes/_chainexchange.md b/source/includes/_chainexchange.md index 39a65c80..dc55b5af 100644 --- a/source/includes/_chainexchange.md +++ b/source/includes/_chainexchange.md @@ -12,16 +12,17 @@ Retrieves a subaccount's deposits ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -44,7 +45,7 @@ async def main() -> None: subaccount_id = address.get_subaccount_id(index=0) deposits = await client.fetch_subaccount_deposits(subaccount_id=subaccount_id) - print(deposits) + print(json.dumps(deposits, indent=2)) if __name__ == "__main__": @@ -52,8 +53,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -72,7 +73,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -103,7 +104,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -121,25 +122,21 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` - - -
ParameterTypeDescriptionRequired
subaccount_idStringThe subaccount IDNo
subaccountSubaccountThe subaccount infoNo
+
**Subaccount** - - -
ParameterTypeDescriptionRequired
traderStringThe subaccount trader addressNo
subaccount_nonceIntegerThe subaccount nonce numberNo
+ ### Response Parameters @@ -180,17 +177,17 @@ func main() { } ``` - -
ParameterTypeDescription
depositsMap String to DepositMap with the token denom as key, and a deposit information as value
+ +
ParameterTypeDescription
depositsmap[string]Deposit

**Deposit** - - -
ParameterTypeDescription
available_balanceDecimalDeposit available balance
total_balanceDecimalDeposit total balance
+ + +
ParameterTypeDescription
available_balancecosmossdk_io_math.LegacyDecthe available balance (in chain format)
total_balancecosmossdk_io_math.LegacyDecthe total balance (in chain format)
@@ -203,16 +200,17 @@ Retrieves a subaccount's deposit ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -235,7 +233,7 @@ async def main() -> None: subaccount_id = address.get_subaccount_id(index=0) deposit = await client.fetch_subaccount_deposit(subaccount_id=subaccount_id, denom="inj") - print(deposit) + print(json.dumps(deposit, indent=2)) if __name__ == "__main__": @@ -243,8 +241,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -263,7 +261,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -294,7 +292,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -313,7 +311,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -345,9 +343,9 @@ func main() { **Deposit** - - -
ParameterTypeDescription
available_balanceDecimalDeposit available balance
total_balanceDecimalDeposit total balance
+ + +
ParameterTypeDescription
available_balancecosmossdk_io_math.LegacyDecthe available balance (in chain format)
total_balancecosmossdk_io_math.LegacyDecthe total balance (in chain format)
@@ -360,12 +358,13 @@ Retrieves the balances for all accounts registered in the exchange module ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -376,7 +375,7 @@ async def main() -> None: client = AsyncClient(network) balances = await client.fetch_exchange_balances() - print(balances) + print(json.dumps(balances, indent=2)) if __name__ == "__main__": @@ -384,8 +383,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -404,7 +403,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -435,7 +434,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -452,7 +451,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -477,8 +476,8 @@ No parameters } ``` - -
ParameterTypeDescription
depositsDepositThe subaccount's deposits for the specified token
+ +
ParameterTypeDescription
balancesBalance ArrayList of all accounts' balances

@@ -495,9 +494,9 @@ No parameters **Deposit** - - -
ParameterTypeDescription
available_balanceDecimalDeposit available balance
total_balanceDecimalDeposit total balance
+ + +
ParameterTypeDescription
available_balancecosmossdk_io_math.LegacyDecthe available balance (in chain format)
total_balancecosmossdk_io_math.LegacyDecthe total balance (in chain format)
@@ -510,16 +509,17 @@ Retrieves the aggregate volumes for the specified account or subaccount ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -541,10 +541,10 @@ async def main() -> None: subaccount_id = address.get_subaccount_id(index=0) volume = await client.fetch_aggregate_volume(account=address.to_acc_bech32()) - print(volume) + print(json.dumps(volume, indent=2)) volume = await client.fetch_aggregate_volume(account=subaccount_id) - print(volume) + print(json.dumps(volume, indent=2)) if __name__ == "__main__": @@ -552,8 +552,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -572,7 +572,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -603,7 +603,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -622,7 +622,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) res, err = chainClient.FetchAggregateVolume(ctx, subaccountId.Hex()) @@ -630,7 +630,7 @@ func main() { fmt.Println(err) } - str, _ = json.MarshalIndent(res, "", " ") + str, _ = json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -646,29 +646,29 @@ func main() { ``` json { - "aggregateVolumes":[ - { - "marketId":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", - "volume":{ - "makerVolume":"1689236673987000000000000000000", - "takerVolume":"501627449819312000000000000000" - } - }, - { - "marketId":"0x141e3c92ed55107067ceb60ee412b86256cedef67b1227d6367b4cdf30c55a74", - "volume":{ - "makerVolume":"67687000000000000000000000000", - "takerVolume":"5387728000000000000000000000" - } - }, - { - "marketId":"0x14f82598b92674598af196770a45e1b808a4ef3aa86eb9ca09aff1aeab33ac46", - "volume":{ - "makerVolume":"10648800000000000000000000", - "takerVolume":"21548000000000000000000000" - } - } - ] + "aggregate_volumes": [ + { + "market_id": "0x0033118e7cf665369d4208ea03c88549f151c1303f43442413679c8c407cc0d3", + "volume": { + "maker_volume": "0.000000000000000000", + "taker_volume": "517.964166944195530000" + } + }, + { + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "volume": { + "maker_volume": "6920720.332267000000000000", + "taker_volume": "8251230.030349665999999981" + } + }, + { + "market_id": "0x0f03542809143c7e5d3c22f56bc6e51eb2c8bab5009161b58f6f468432dfa196", + "volume": { + "maker_volume": "19883.294699000000000000", + "taker_volume": "27665.175938000000000000" + } + } + ] } ``` @@ -690,8 +690,8 @@ func main() { **VolumeRecord** - -
ParameterTypeDescription
maker_volumeDecimalThe maker volume
taker_volumeDecimalThe taker volume
+ +
ParameterTypeDescription
maker_volumeDecimalThe maker volume (in human redable format)
taker_volumeDecimalThe taker volume (in human redable format)
@@ -704,16 +704,17 @@ Retrieves the aggregate volumes for specified accounts ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -736,7 +737,7 @@ async def main() -> None: accounts=[address.to_acc_bech32()], market_ids=["0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe"], ) - print(volume) + print(json.dumps(volume, indent=2)) if __name__ == "__main__": @@ -744,8 +745,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -764,7 +765,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -795,7 +796,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -815,7 +816,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -832,29 +833,29 @@ func main() { ``` json { - "aggregateAccountVolumes":[ - { - "account":"inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r", - "marketVolumes":[ - { - "marketId":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", - "volume":{ - "makerVolume":"1689236673987000000000000000000", - "takerVolume":"501627449819312000000000000000" - } - } - ] - } - ], - "aggregateMarketVolumes":[ - { - "marketId":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", - "volume":{ - "makerVolume":"3070484904498656000000000000000000", - "takerVolume":"3073070717217233353000000000000000" - } - } - ] + "aggregate_account_volumes": [ + { + "account": "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku", + "market_volumes": [ + { + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "volume": { + "maker_volume": "6920720.332267000000000000", + "taker_volume": "8251230.030349665999999981" + } + } + ] + } + ], + "aggregate_market_volumes": [ + { + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "volume": { + "maker_volume": "5265332551.630613000000000000", + "taker_volume": "5268011997.041324344999998038" + } + } + ] } ``` @@ -886,8 +887,8 @@ func main() { **VolumeRecord** - -
ParameterTypeDescription
maker_volumeDecimalThe maker volume
taker_volumeDecimalThe taker volume
+ +
ParameterTypeDescription
maker_volumeDecimalThe maker volume (in human redable format)
taker_volumeDecimalThe taker volume (in human redable format)
@@ -900,12 +901,13 @@ Retrieves the aggregate volume for the specified market ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -919,7 +921,7 @@ async def main() -> None: market_id = "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" volume = await client.fetch_aggregate_market_volume(market_id=market_id) - print(volume) + print(json.dumps(volume, indent=2)) if __name__ == "__main__": @@ -927,8 +929,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -947,7 +949,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -978,7 +980,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -997,7 +999,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1013,10 +1015,10 @@ func main() { ``` json { - "volume":{ - "makerVolume":"3070574313724656000000000000000000", - "takerVolume":"3073160126443233353000000000000000" - } + "volume": { + "maker_volume": "5265332551.630613000000000000", + "taker_volume": "5268011997.041324344999998038" + } } ``` @@ -1029,8 +1031,8 @@ func main() { **VolumeRecord** - -
ParameterTypeDescription
maker_volumeDecimalThe maker volume
taker_volumeDecimalThe taker volume
+ +
ParameterTypeDescription
maker_volumeDecimalThe maker volume (in human redable format)
taker_volumeDecimalThe taker volume (in human redable format)
@@ -1043,12 +1045,12 @@ Retrieves the aggregate market volumes for specified markets ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1070,8 +1072,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1090,7 +1092,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1121,7 +1123,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1140,7 +1142,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1156,15 +1158,15 @@ func main() { ``` json { - "volumes":[ - { - "marketId":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", - "volume":{ - "makerVolume":"3070590556798408000000000000000000", - "takerVolume":"3073176369516985353000000000000000" - } - } - ] + "volumes": [ + { + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "volume": { + "maker_volume": "5265332551.630613000000000000", + "taker_volume": "5268011997.041324344999998038" + } + } + ] } ``` @@ -1186,8 +1188,8 @@ func main() { **VolumeRecord** - -
ParameterTypeDescription
maker_volumeDecimalThe maker volume
taker_volumeDecimalThe taker volume
+ +
ParameterTypeDescription
maker_volumeDecimalThe maker volume (in human redable format)
taker_volumeDecimalThe taker volume (in human redable format)
@@ -1200,12 +1202,12 @@ Retrieves the number of decimals used for a denom ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1225,8 +1227,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1245,7 +1247,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1276,7 +1278,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1295,7 +1297,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1329,12 +1331,12 @@ Retrieves the denom decimals for multiple denoms ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1354,8 +1356,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1374,7 +1376,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1405,7 +1407,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1424,7 +1426,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1477,8 +1479,8 @@ Retrieves subaccount's orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1486,7 +1488,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1520,8 +1522,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1539,7 +1541,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1570,7 +1572,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1590,7 +1592,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1651,8 +1653,8 @@ Retrieves a subaccount's trade nonce ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1660,7 +1662,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1693,8 +1695,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1713,7 +1715,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1744,7 +1746,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1763,7 +1765,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1797,8 +1799,8 @@ Retrieves subaccount's order metadata ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1806,7 +1808,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1839,8 +1841,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1858,7 +1860,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1889,7 +1891,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1908,7 +1910,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1990,8 +1992,8 @@ Retrieves the account and total trade rewards points ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1999,7 +2001,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2030,8 +2032,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2049,7 +2051,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2080,7 +2082,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2099,7 +2101,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2136,8 +2138,8 @@ Retrieves the pending account and total trade rewards points ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -2145,7 +2147,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2176,8 +2178,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2195,7 +2197,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2226,7 +2228,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2245,7 +2247,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2282,8 +2284,8 @@ Retrieves the trade reward campaign ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -2291,7 +2293,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2320,8 +2322,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2339,7 +2341,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2370,7 +2372,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2387,7 +2389,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2472,8 +2474,8 @@ Retrieves the account's fee discount info ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -2481,7 +2483,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2512,8 +2514,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2531,7 +2533,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2562,7 +2564,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2579,15 +2581,15 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` - -
ParameterTypeDescriptionRequired
accountStringAccount address to query forYes
+ +
ParameterTypeDescriptionRequired
accountstringYes
### Response Parameters @@ -2595,40 +2597,42 @@ func main() { ``` json { - "accountInfo":{ - "makerDiscountRate":"0", - "takerDiscountRate":"0", - "stakedAmount":"1008990017144791", - "volume":"63626657729000000000000000000" - }, - "tierLevel":"0" + "account_info": { + "maker_discount_rate": "0.000000000000000000", + "taker_discount_rate": "0.000000000000000000", + "staked_amount": "999397551050222369770", + "volume": "33.861597433912020000" + }, + "account_ttl": { + "ttl_timestamp": 1750204196 + } } ``` - - - -
ParameterTypeDescription
tier_levelIntegerFee discount tier
account_infoFeeDiscountTierInfoFee discount tier info
account_ttlFeeDiscountTierTTLFee discount tier TTL
+ + + +
ParameterTypeDescription
tier_leveluint64
account_infoFeeDiscountTierInfo
account_ttlFeeDiscountTierTTL

**FeeDiscountTierInfo** - - - - -
ParameterTypeDescription
maker_discount_rateDecimalMaker trades' discount rate
taker_discount_rateDecimalTaker trades' discount rate
staked_amountDecimalStaked smount to reach this discount tier
volumeDecimalVolume to reach this discount tier
+ + + + +
ParameterTypeDescription
maker_discount_ratecosmossdk_io_math.LegacyDecthe maker discount rate
taker_discount_ratecosmossdk_io_math.LegacyDecthe taker discount rate
staked_amountcosmossdk_io_math.Intthe staked amount required to qualify for the discount (in chain format)
volumecosmossdk_io_math.LegacyDecthe volume required to qualify for the discount (in human readable format)

**FeeDiscountTierTTL** - - -
ParameterTypeDescription
tierIntegerTier number
ttl_timestampDecimalTier TTL
+ + +
ParameterTypeDescription
tieruint64the tier number
ttl_timestampint64the TTL timestamp in seconds
@@ -2641,12 +2645,12 @@ Retrieves the fee discount schedule ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2666,8 +2670,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2685,7 +2689,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2716,7 +2720,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2733,7 +2737,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2817,31 +2821,31 @@ No parameters } ``` - -
ParameterTypeDescription
fee_discount_scheduleFeeDiscountScheduleFee discount schedule
+ +
ParameterTypeDescription
fee_discount_scheduleFeeDiscountSchedule

**FeeDiscountSchedule** - - - - - -
ParameterTypeDescription
bucket_countIntegerBucket count
bucket_durationIntegerDuration in seconds
quote_denomsString ArrayThe trading fee quote denoms which will be counted for the fee paid contribution
tier_infosFeeDiscountTierInfo ArrayThe fee discount tiers
disqualified_market_idsString ArrayThe marketIDs which are disqualified from contributing to the fee paid amount
+ + + + + +
ParameterTypeDescription
bucket_countuint64the bucket number
bucket_durationint64the bucket duration in seconds
quote_denomsstring arraythe trading fee quote denoms which will be counted for the fee paid contribution
tier_infosFeeDiscountTierInfo arraythe fee discount tiers
disqualified_market_idsstring arraythe marketIDs which are disqualified from contributing to the fee paid amount

**FeeDiscountTierInfo** - - - - -
ParameterTypeDescription
maker_discount_rateDecimalMaker trades' discount rate
taker_discount_rateDecimalTaker trades' discount rate
staked_amountDecimalStaked smount to reach this discount tier
volumeDecimalVolume to reach this discount tier
+ + + + +
ParameterTypeDescription
maker_discount_ratecosmossdk_io_math.LegacyDecthe maker discount rate
taker_discount_ratecosmossdk_io_math.LegacyDecthe taker discount rate
staked_amountcosmossdk_io_math.Intthe staked amount required to qualify for the discount (in chain format)
volumecosmossdk_io_math.LegacyDecthe volume required to qualify for the discount (in human readable format)
@@ -2854,12 +2858,12 @@ Retrieves mismatches between available vs. total balance ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2879,8 +2883,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2898,7 +2902,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2929,7 +2933,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2946,7 +2950,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -3112,12 +3116,12 @@ Retrieves available and total balances with balance holds ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -3137,8 +3141,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3156,7 +3160,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3187,7 +3191,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -3204,7 +3208,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -3263,12 +3267,12 @@ Retrieves fee discount tier stats ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -3288,8 +3292,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3307,7 +3311,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3338,7 +3342,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -3355,7 +3359,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -3433,12 +3437,12 @@ Retrieves market making pool info ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -3458,8 +3462,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3477,7 +3481,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3508,7 +3512,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -3525,7 +3529,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -3554,11 +3558,11 @@ No parameters } ``` - - - - -
ParameterTypeDescription
master_addressesString ArrayList of master addresses
derivative_addressesString ArrayList of derivative addresses
spot_addressesString ArrayList of spot addresses
cw20_addressesString ArrayList of cw20 contract addresses
+ + + + +
ParameterTypeDescription
master_addressesstring arraylist of master addresses
derivative_addressesstring arraylist of derivative addresses
spot_addressesstring arraylist of spot addresses
cw20_addressesstring arraylist of cw20 addresses
@@ -3571,12 +3575,12 @@ Returns the market ID for a given vault subaccount ID ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -3596,8 +3600,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3615,7 +3619,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3646,7 +3650,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -3665,15 +3669,15 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` - -
ParameterTypeDescriptionRequired
vault_addressStringThe vault address to query forYes
+ +
ParameterTypeDescriptionRequired
vault_addressstringYes
### Response Parameters @@ -3683,8 +3687,8 @@ func main() { ``` - -
ParameterTypeDescription
market_idStringThe vault's market ID
+ +
ParameterTypeDescription
market_idstring
@@ -3697,12 +3701,12 @@ Retrieves historical trade records for a given market ID ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -3724,8 +3728,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3744,7 +3748,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3775,7 +3779,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -3794,15 +3798,15 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` - -
ParameterTypeDescriptionRequired
market_idStringThe market ID to query forYes
+ +
ParameterTypeDescriptionRequired
market_idstringYes
### Response Parameters @@ -3830,27 +3834,27 @@ func main() { } ``` - -
ParameterTypeDescription
trade_recordsTradeRecords ArrayList of trade records
+ +
ParameterTypeDescription
trade_recordsTradeRecords array

**TradeRecords** - - -
ParameterTypeDescription
market_idStringThe market ID
latest_trade_recordsTradeRecord ArrayList of trade records
+ + +
ParameterTypeDescription
market_idstring
latest_trade_recordsTradeRecord array

**TradeRecord** - - - -
ParameterTypeDescription
timestampIntegerTrade timestamp
priceDecimalTrade price
quantityDecimalTrade quantity
+ + + +
ParameterTypeDescription
timestampint64the timestamp of the trade
pricecosmossdk_io_math.LegacyDecthe price of the trade (in human readable format)
quantitycosmossdk_io_math.LegacyDecthe quantity of the trade (in human readable format)
@@ -3863,8 +3867,8 @@ Retrieves if the account is opted out of rewards ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -3872,7 +3876,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -3903,8 +3907,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3923,7 +3927,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3954,7 +3958,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -3971,15 +3975,15 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` - -
ParameterTypeDescriptionRequired
accountStringThe account's address to query forYes
+ +
ParameterTypeDescriptionRequired
accountstringYes
### Response Parameters @@ -3991,8 +3995,8 @@ func main() { } ``` - -
ParameterTypeDescription
is_opted_outBooleanOpted out state for the account
+ +
ParameterTypeDescription
is_opted_outbool
@@ -4005,12 +4009,12 @@ Retrieves all accounts opted out of rewards ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -4030,8 +4034,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4050,7 +4054,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4081,7 +4085,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -4098,7 +4102,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -4124,8 +4128,8 @@ No parameters } ``` - -
ParameterTypeDescription
accountsString ArrayList of opted out accounts
+ +
ParameterTypeDescription
accountsstring array
@@ -4138,12 +4142,13 @@ Computes the volatility for spot and derivative markets trading history ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -4166,7 +4171,7 @@ async def main() -> None: include_raw_history=include_raw_history, include_metadata=include_metadata, ) - print(volatility) + print(json.dumps(volatility, indent=4)) if __name__ == "__main__": @@ -4174,8 +4179,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4183,20 +4188,19 @@ import ( "context" "encoding/json" "fmt" - - "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - "os" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4227,7 +4231,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -4240,7 +4244,7 @@ func main() { ctx := context.Background() marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - tradeHistoryOptions := types.TradeHistoryOptions{ + tradeHistoryOptions := exchangev2types.TradeHistoryOptions{ TradeGroupingSec: 10, MaxAge: 0, IncludeRawHistory: true, @@ -4252,7 +4256,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -4280,63 +4284,58 @@ func main() { ``` json { - "volatility":"0", - "historyMetadata":{ - "groupCount":2, - "recordsSampleSize":2, - "mean":"42109967", - "twap":"42080000", - "firstTimestamp":"1709644088", - "lastTimestamp":"1709644207", - "minPrice":"42080000", - "maxPrice":"42110000", - "medianPrice":"42095000" - }, - "rawHistory":[ - { - "timestamp":"1709644088", - "price":"42110000", - "quantity":"15330000000000000000000000000000000000" - }, - { - "timestamp":"1709644207", - "price":"42080000", - "quantity":"17000000000000000000000000000000000" - } - ] + "volatility": "0.000000000000000000", + "history_metadata": { + "group_count": 1, + "records_sample_size": 1, + "mean": "10.500000000000000000", + "twap": "0.000000000000000000", + "first_timestamp": "1750251696", + "last_timestamp": "1750251696", + "min_price": "10.500000000000000000", + "max_price": "10.500000000000000000", + "median_price": "10.500000000000000000" + }, + "raw_history": [ + { + "timestamp": "1750251696", + "price": "10.500000000000000000", + "quantity": "0.788000000000000000" + } + ] } ``` - - - -
ParameterTypeDescription
volatilityDecimalMarket's volatility
history_metadataMetadataStatisticsMarket's volatility
raw_historyTradeRecord ArrayList of trade records
+ + + +
ParameterTypeDescription
volatilitycosmossdk_io_math.LegacyDec
history_metadatatypes.MetadataStatistics
raw_historyTradeRecord array

**MetadataStatistics** - - - - - - - - - -
ParameterTypeDescription
group_countIntegerRefers to the number of groups used. Equals records_sample_size if no grouping is used
records_sample_sizeIntegerRefers to the total number of records used
meanDecimalRefers to the arithmetic mean. For trades, the mean is the VWAP computed over the grouped trade records ∑ (price * quantity) / ∑ quantity For oracle prices, the mean is computed over the price records ∑ (price) / prices_count
twapDecimalRefers to the time-weighted average price which equals ∑ (price_i * ∆t_i) / ∑ ∆t_i where ∆t_i = t_i - t_{i-1}
first_timestampIntegerThe timestamp of the oldest record considered
last_timestampIntegerThe timestamp of the youngest record considered
min_priceDecimalRefers to the smallest individual raw price considered
max_priceDecimalRefers to the largest individual raw price considered
median_priceDecimalRefers to the median individual raw price considered
+ + + + + + + + + +
ParameterTypeDescription
group_countuint32GroupCount refers to the number of groups used. Equals RecordsSampleSize if no grouping is used
records_sample_sizeuint32RecordsSampleSize refers to the total number of records used.
meancosmossdk_io_math.LegacyDecMean refers to the arithmetic mean For trades, the mean is the VWAP computed over the grouped trade records ∑ (price * quantity) / ∑ quantity For oracle prices, the mean is computed over the price records ∑ (price) / prices_count
twapcosmossdk_io_math.LegacyDecTWAP refers to the time-weighted average price which equals ∑ (price_i * ∆t_i) / ∑ ∆t_i where ∆t_i = t_i - t_{i-1}
first_timestampint64FirstTimestamp is the timestamp of the oldest record considered
last_timestampint64LastTimestamp is the timestamp of the youngest record considered
min_pricecosmossdk_io_math.LegacyDecMinPrice refers to the smallest individual raw price considered
max_pricecosmossdk_io_math.LegacyDecMaxPrice refers to the largest individual raw price considered
median_pricecosmossdk_io_math.LegacyDecMedianPrice refers to the median individual raw price considered

**TradeRecord** - - - -
ParameterTypeDescription
timestampIntegerTrade timestamp
priceDecimalTrade price
quantityDecimalTrade quantity
+ + + +
ParameterTypeDescription
timestampint64the timestamp of the trade
pricecosmossdk_io_math.LegacyDecthe price of the trade (in human readable format)
quantitycosmossdk_io_math.LegacyDecthe quantity of the trade (in human readable format)
@@ -4349,12 +4348,12 @@ Retrieves the atomic execution fee multiplier ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -4376,8 +4375,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4396,7 +4395,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4427,7 +4426,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -4446,15 +4445,15 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` - -
ParameterTypeDescriptionRequired
market_idStringThe market ID to query forYes
+ +
ParameterTypeDescriptionRequired
market_idstringYes
### Response Parameters @@ -4462,54 +4461,50 @@ func main() { ``` json { - "multiplier":"2000000000000000000" + "multiplier": "2.000000000000000000" } ``` - -
ParameterTypeDescription
multiplierDecimalThe multiplier value
+ +
ParameterTypeDescription
multipliercosmossdk_io_math.LegacyDec
-## MarketBalance +## ActiveStakeGrant -Retrieves a derivative or binary options market's balance +Retrieves the active stake grant for a grantee **IP rate limit group:** `chain` ### Request Parameters > Request Example: - - + + ```py import asyncio +import os + +import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network async def main() -> None: - """ - Demonstrate fetching market balance using AsyncClient. - """ - # Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() + dotenv.load_dotenv() + grantee_public_address = os.getenv("INJECTIVE_GRANTEE_PUBLIC_ADDRESS") + + # select network: local, testnet, mainnet network = Network.testnet() - # Initialize the Async Client + # initialize grpc client client = AsyncClient(network) - try: - # Example market ID (replace with an actual market ID from the network) - market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - - # Fetch market balance - market_balance = await client.fetch_market_balance(market_id=market_id) - print("Market Balance:") - print(market_balance) - - except Exception as ex: - print(f"Error occurred: {ex}") + active_grant = await client.fetch_active_stake_grant( + grantee=grantee_public_address, + ) + print(active_grant) if __name__ == "__main__": @@ -4517,8 +4512,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4526,19 +4521,17 @@ import ( "context" "encoding/json" "fmt" - "log" "os" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4569,7 +4562,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -4579,21 +4572,24 @@ func main() { panic(err) } - marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" // Example derivative market ID + ctx := context.Background() + + grantee := "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r" - res, err := chainClient.FetchMarketBalance(context.Background(), marketId) + res, err := chainClient.FetchActiveStakeGrant(ctx, grantee) if err != nil { - log.Fatalf("Failed to fetch market balance: %v", err) + fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) + } ``` - -
ParameterTypeDescriptionRequired
market_idStringMarket ID to request forYes
+ +
ParameterTypeDescriptionRequired
granteestringYes
### Response Parameters @@ -4601,60 +4597,85 @@ func main() { ``` json { - "balance":"2000000000000000000" + "grant": { + "granter": "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku", + "amount": "1000000000000000000" + }, + "effective_grant": { + "granter": "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku", + "net_granted_stake": "1000000000000000000", + "is_valid": true + } } ``` - -
ParameterTypeDescription
balanceMarketBalanceThe current market balance
+ + +
ParameterTypeDescription
grantActiveGrant
effective_grantEffectiveGrant

-**MarketBalance** +**ActiveGrant** - - -
ParameterTypeDescription
market_idStringID of the market
balanceDecimalCurrent market balance
+ + +
ParameterTypeDescription
granterstring
amountcosmossdk_io_math.Int
+
+ +**EffectiveGrant** -## MarketBalances + + + +
ParameterTypeDescription
granterstring
net_granted_stakecosmossdk_io_math.Int
is_validbool
+ -Retrieves all derivative or binary options market balances + +## GrantAuthorization + +Retrieves the grant authorization amount for a granter and grantee **IP rate limit group:** `chain` ### Request Parameters > Request Example: - - + + ```py import asyncio +import os + +import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network async def main() -> None: - """ - Demonstrate fetching market balances using AsyncClient. - """ - # Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + grantee_public_address = os.getenv("INJECTIVE_GRANTEE_PUBLIC_ADDRESS") + + # select network: local, testnet, mainnet network = Network.testnet() - # Initialize the Async Client + # initialize grpc client client = AsyncClient(network) - try: - # Fetch market balances - market_balances = await client.fetch_market_balances() - print("Market Balances:") - print(market_balances) + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() - except Exception as ex: - print(f"Error occurred: {ex}") + active_grant = await client.fetch_grant_authorization( + granter=address.to_acc_bech32(), + grantee=grantee_public_address, + ) + print(active_grant) if __name__ == "__main__": @@ -4662,8 +4683,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4671,19 +4692,17 @@ import ( "context" "encoding/json" "fmt" - "log" "os" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4714,109 +4733,101 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), ) - res, err := chainClient.FetchMarketBalances(context.Background()) if err != nil { - log.Fatalf("Failed to fetch market balances: %v", err) + panic(err) + } + + ctx := context.Background() + + granter := senderAddress.String() + grantee := "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r" + + res, err := chainClient.FetchGrantAuthorization(ctx, granter, grantee) + if err != nil { + fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) + } ``` -No parameters - + + +
ParameterTypeDescriptionRequired
granterstringYes
granteestringYes
+ ### Response Parameters > Response Example: ``` json { - "balances": [ - { - "market_id": "0x1422a13427d5eabd4d8de7907c8340f7e58cb15553a9fd4ad5c90406561886f9", - "balance": "8533732857.387289192922314363" - }, - { - "market_id": "0x1c284820f24dff4c60fecd521a9df3df9c745d23dd585d45bf418653c2d73ab4", - "balance": "617867220.109659443876013950" - }, - { - "market_id": "0x1f73e21972972c69c03fb105a5864592ac2b47996ffea3c500d1ea2d20138717", - "balance": "458391669.230063218253310107" - }, - { - "market_id": "0x56d0c0293c4415e2d48fc2c8503a56a0c7389247396a2ef9b0a48c01f0646705", - "balance": "2217666106.022509578544061311" - }, - { - "market_id": "0xb64332daa987dcb200c26965bc9adaf8aa301fe3a0aecb0232fadbd3dfccd0d8", - "balance": "310256624.777427104432615764" - } - ] + "grant": { + "granter": "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku", + "amount": "1000000000000000000" + }, + "effective_grant": { + "granter": "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku", + "net_granted_stake": "1000000000000000000", + "is_valid": true + } } ``` - -
ParameterTypeDescription
balancesMarketBalance ArrayThe list of market balances
- - -
- -**MarketBalance** - - - -
ParameterTypeDescription
market_idStringID of the market
balanceDecimalCurrent market balance
+ +
ParameterTypeDescription
amountcosmossdk_io_math.Int
-## DenomMinNotional +## GrantAuthorizations -Retrieves the min notional for a denom +Retrieves the grant authorization amount for a granter and grantee **IP rate limit group:** `chain` ### Request Parameters > Request Example: - - + + ```py import asyncio +import json +import os + +import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network async def main() -> None: - """ - Demonstrate fetching denom min notional using AsyncClient. - """ - # Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet network = Network.testnet() - # Initialize the Async Client + # initialize grpc client client = AsyncClient(network) - try: - # Example denom - denom = "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test" - - # Fetch market balance - min_notional = await client.fetch_denom_min_notional(denom=denom) - print("Min Notional:") - print(min_notional) + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() - except Exception as ex: - print(f"Error occurred: {ex}") + active_grant = await client.fetch_grant_authorizations( + granter=address.to_acc_bech32(), + ) + print(json.dumps(active_grant, indent=4)) if __name__ == "__main__": @@ -4824,8 +4835,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4833,19 +4844,17 @@ import ( "context" "encoding/json" "fmt" - "log" "os" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4876,27 +4885,34 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), ) - denom := "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5" + if err != nil { + panic(err) + } - res, err := chainClient.FetchDenomMinNotional(context.Background(), denom) + ctx := context.Background() + + granter := senderAddress.String() + + res, err := chainClient.FetchGrantAuthorizations(ctx, granter) if err != nil { - log.Fatalf("Failed to fetch denom min notional for %s: %v", denom, err) + fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) + } ``` - -
ParameterTypeDescriptionRequired
denomStringThe denom to request the minimum notional forYes
+ +
ParameterTypeDescriptionRequired
granterstringYes
### Response Parameters @@ -4904,36 +4920,39 @@ func main() { ``` json { - "amount":"2000000000000000000" + "totalGrantAmount": "0", + "grants": [] } ``` - -
ParameterTypeDescription
amountDecimalMarket minimum notional
+ + +
ParameterTypeDescription
total_grant_amountcosmossdk_io_math.Int
grantsGrantAuthorization array
-## DenomMinNotionals +## MarketBalance -Retrieves the min notionals for all denoms +Retrieves a derivative or binary options market's balance **IP rate limit group:** `chain` ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network async def main() -> None: """ - Demonstrate fetching denom min notionals using AsyncClient. + Demonstrate fetching market balances using AsyncClient. """ # Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() network = Network.testnet() @@ -4942,10 +4961,12 @@ async def main() -> None: client = AsyncClient(network) try: - # Fetch market balance - min_notionals = await client.fetch_denom_min_notionals() - print("Min Notionals:") - print(min_notionals) + # Fetch market balances + market_balance = await client.fetch_market_balance( + market_id="0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" + ) + print("Market Balance:") + print(json.dumps(market_balance, indent=4)) except Exception as ex: print(f"Error occurred: {ex}") @@ -4956,8 +4977,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4976,8 +4997,8 @@ import ( ) func main() { - network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -5008,156 +5029,301 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), ) - res, err := chainClient.FetchDenomMinNotionals(context.Background()) if err != nil { - log.Fatalf("Failed to fetch denoms min notionals: %v", err) + panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" + res, err := chainClient.FetchMarketBalance(context.Background(), marketId) + if err != nil { + log.Fatalf("Failed to fetch market balance: %v", err) + } + + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` -No parameters - + +
ParameterTypeDescriptionRequired
market_idstringmarket idYes
+ ### Response Parameters > Response Example: ``` json { - "denom_min_notionals": [ - { - "denom": "ibc/2CBC2EA121AE42563B08028466F37B600F2D7D4282342DE938283CC3FB2BC00E", - "min_notional": "1000000.000000000000000000" - }, - { - "denom": "inj", - "min_notional": "10000000000000000.000000000000000000" - }, - { - "denom": "peggy0x4c9EDD5852cd905f086C759E8383e09bff1E68B3", - "min_notional": "1000000000000000000.000000000000000000" - }, - { - "denom": "peggy0x57F5E098CaD7A3D1Eed53991D4d66C45C9AF7812", - "min_notional": "1000000000000000000.000000000000000000" - }, - { - "denom": "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7", - "min_notional": "1000000.000000000000000000" - } - ] + "balance": { + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "balance": "0.000000000000000000" + } } ``` - -
ParameterTypeDescription
denom_min_notionalsDenomMinNotional ArrayList of all denom minimum notionals
+ +
ParameterTypeDescription
balanceMarketBalance

-**DenomMinNotional** +**MarketBalance** - - -
ParameterTypeDescription
denomStringThe denom ID
min_notionalDecimalThe minimum notional configured for the denom
+ + +
ParameterTypeDescription
market_idstringthe market ID
balancecosmossdk_io_math.LegacyDecthe current balance of the market
-## MsgRewardsOptOut +## MarketBalances + +Retrieves all derivative or binary options market balances **IP rate limit group:** `chain` ### Request Parameters > Request Example: - - + + ```py import asyncio -import os - -import dotenv -from grpc import RpcError +import json -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network -from pyinjective.transaction import Transaction -from pyinjective.wallet import PrivateKey async def main() -> None: - dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") - - # select network: local, testnet, mainnet + """ + Demonstrate fetching market balances using AsyncClient. + """ + # Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() network = Network.testnet() - # initialize grpc client + # Initialize the Async Client client = AsyncClient(network) - composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) - pub_key = priv_key.to_public_key() - address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) + try: + # Fetch market balances + market_balances = await client.fetch_market_balances() + print("Market Balances:") + print(json.dumps(market_balances, indent=4)) - # prepare tx msg - msg = composer.msg_rewards_opt_out(sender=address.to_acc_bech32()) + except Exception as ex: + print(f"Error occurred: {ex}") - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + - # build tx - gas_price = await client.current_chain_gas_price() - # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted - gas_price = int(gas_price * 1.1) + + +```go +package main - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + res, err := chainClient.FetchMarketBalances(context.Background()) + if err != nil { + log.Fatalf("Failed to fetch market balances: %v", err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) +} +``` + + +No parameters + + +### Response Parameters +> Response Example: + +``` json +{ + "balances": [ + { + "market_id": "0x0f03542809143c7e5d3c22f56bc6e51eb2c8bab5009161b58f6f468432dfa196", + "balance": "12786056074.839985155385737295" + }, + { + "market_id": "0x14f82598b92674598af196770a45e1b808a4ef3aa86eb9ca09aff1aeab33ac46", + "balance": "110430504.838630944276932996" + }, + { + "market_id": "0x155576f660b3b6116c1ab7a42fbf58a95adf11b3061f88f81bc8df228e7ac934", + "balance": "192395910452.616033854134359847" + }, + { + "market_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + "balance": "6016868951759.776358953610638498" + }, + { + "market_id": "0x2e94326a421c3f66c15a3b663c7b1ab7fb6a5298b3a57759ecf07f0036793fc9", + "balance": "1862621465555.345621229678183898" + }, + { + "market_id": "0x70bc8d7feab38b23d5fdfb12b9c3726e400c265edbcbf449b6c80c31d63d3a02", + "balance": "1081846808163.026104388432379730" + }, + { + "market_id": "0x820bad0e0cbee65bb0eea5a99c78720c97b7b2217c47dcc0e0875e1ebb35e546", + "balance": "19250932183.917771878838020931" + }, + { + "market_id": "0x95698a9d8ba11660f44d7001d8c6fb191552ece5d9141a05c5d9128711cdc2e0", + "balance": "1776259936686.725194400658361835" + }, + { + "market_id": "0xb6fd8f78b97238eb67146e9b097c131e94730c10170cbcafa82ea2fd14ff62c7", + "balance": "24106730968097.988978884697599456" + }, + { + "market_id": "0xba9c96a1a9cc226cfe6bd9bca3a433e396569d1955393f38f2ee728cfda7ec58", + "balance": "106677202502.228300901587097267" + }, + { + "market_id": "0xc90e8ea048b8fe5c3174d4d0386191765db699d2bf83d0cbaf07e15462115a15", + "balance": "268624705972.943347626458922724" + }, + { + "market_id": "0xd97d0da6f6c11710ef06315971250e4e9aed4b7d4cd02059c9477ec8cf243782", + "balance": "76355383629.090552557946079821" + }, + { + "market_id": "0xdfbb038abf614c59decdaaa02c0446bbebcd16327bd4e9d0350a1e3b691a38ef", + "balance": "5328333.333333333386944360" + }, + { + "market_id": "0xe185b08a7ccd830a94060edd5e457d30f429aa6f0757f75a8b93aa611780cfac", + "balance": "11381866569024.341225836858561702" + }, + { + "market_id": "0xf97a740538e10845e0c3db9ea94c6eaf8a570aeebe3e3511e2e387501a40e4bb", + "balance": "16051013781.249043673289183236" + } + ] +} +``` + + +
ParameterTypeDescription
balancesMarketBalance array
+ + +
+ +**MarketBalance** + + + +
ParameterTypeDescription
market_idstringthe market ID
balancecosmossdk_io_math.LegacyDecthe current balance of the market
+ + + +## DenomMinNotional + +Retrieves the min notional for a denom + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + """ + Demonstrate fetching denom min notional using AsyncClient. + """ + # Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() + network = Network.testnet() + + # Initialize the Async Client + client = AsyncClient(network) + + try: + # Example denom + denom = "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test" + + # Fetch market balance + min_notional = await client.fetch_denom_min_notional(denom=denom) + print("Min Notional:") + print(min_notional) + + except Exception as ex: + print(f"Error occurred: {ex}") if __name__ == "__main__": @@ -5165,26 +5331,28 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" + "log" "os" - "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -5215,129 +5383,400 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), ) if err != nil { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() - // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted - gasPrice = int64(float64(gasPrice) * 1.1) - chainClient.SetGasPrice(gasPrice) + denom := "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5" - msg := &exchangetypes.MsgRewardsOptOut{ - Sender: senderAddress.String(), + res, err := chainClient.FetchDenomMinNotional(context.Background(), denom) + if err != nil { + log.Fatalf("Failed to fetch denom min notional for %s: %v", denom, err) } - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) +} +``` + + + +
ParameterTypeDescriptionRequired
denomstringYes
+ + +### Response Parameters +> Response Example: + +``` json +{ + "amount": "1.000000000000000000" +} +``` + + +
ParameterTypeDescription
amountcosmossdk_io_math.LegacyDecthe minimum notional amount for the denom (in human readable format)
+ + + +## DenomMinNotionals + +Retrieves the min notionals for all denoms + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + """ + Demonstrate fetching denom min notionals using AsyncClient. + """ + # Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() + network = Network.testnet() + + # Initialize the Async Client + client = AsyncClient(network) + + try: + # Fetch market balance + min_notionals = await client.fetch_denom_min_notionals() + print("Min Notionals:") + print(min_notionals) + + except Exception as ex: + print(f"Error occurred: {ex}") + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("devnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { - fmt.Println(err) + panic(err) } - time.Sleep(time.Second * 5) + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } - gasFee, err := chainClient.GetGasFee() + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - gasPrice = chainClient.CurrentChainGasPrice() - // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted - gasPrice = int64(float64(gasPrice) * 1.1) - chainClient.SetGasPrice(gasPrice) + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + res, err := chainClient.FetchDenomMinNotionals(context.Background()) + if err != nil { + log.Fatalf("Failed to fetch denoms min notionals: %v", err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) } ``` - -
ParameterTypeDescriptionRequired
senderStringThe sender's addressYes
- +No parameters + ### Response Parameters > Response Example: ``` json +{ + "denom_min_notionals": [ + { + "denom": "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9", + "min_notional": "1.000000000000000000" + }, + { + "denom": "inj", + "min_notional": "0.010000000000000000" + }, + { + "denom": "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7", + "min_notional": "1.000000000000000000" + } + ] +} ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
denom_min_notionalsDenomMinNotional array

-**TxResponse** +**DenomMinNotional** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + +
ParameterTypeDescription
denomstringthe denom of the token
min_notionalcosmossdk_io_math.LegacyDecthe minimum notional value for the token (in human readable format)
-
-**ABCIMessageLog** +## MsgRewardsOptOut + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
+import dotenv + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk +from pyinjective.core.network import Network +from pyinjective.wallet import PrivateKey + + +async def main() -> None: + dotenv.load_dotenv() + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + composer = await client.composer() + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + + # prepare tx msg + msg = composer.msg_rewards_opt_out(sender=address.to_acc_bech32()) + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + message_broadcaster.update_gas_price(gas_price=gas_price) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` -
+ + +```go +package main -**Event** +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
+ senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + ) + + if err != nil { + panic(err) + } + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) + + msg := exchangev2types.MsgRewardsOptOut{ + Sender: senderAddress.String(), + } + + // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) + + gasPrice = chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) +} +``` -
+ +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
+ + +### Response Parameters +> Response Example: -**StringEvent** +``` json +``` - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

-**EventAttribute** +**TxResponse** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

-**Attribute** +**ABCIMessageLog** - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -5351,8 +5790,8 @@ Message to grant stakes to grantees. ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -5361,7 +5800,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -5420,27 +5859,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -5471,7 +5912,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -5480,32 +5921,35 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - grantAuthorization := &exchangetypes.GrantAuthorization{ + grantAuthorization := &exchangev2types.GrantAuthorization{ Grantee: "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r", Amount: math.NewIntWithDecimal(1, 18), } - msg := &exchangetypes.MsgAuthorizeStakeGrants{ + msg := &exchangev2types.MsgAuthorizeStakeGrants{ Sender: senderAddress.String(), - Grants: []*exchangetypes.GrantAuthorization{grantAuthorization}, + Grants: []*exchangev2types.GrantAuthorization{grantAuthorization}, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -5513,18 +5957,18 @@ func main() { ``` - - -
ParameterTypeDescriptionRequired
senderStringInjective address of the stake granterYes
grantsGrantAuthorization ArrayList of grants assigned to the granteesYes
+ + +
ParameterTypeDescriptionRequired
senderstringInjective address of the stake granterYes
grantsGrantAuthorization arraylist of stake grants to authorize (mandatory)Yes

**GrantAuthorization** - - -
ParameterTypeDescription
granteeStringGrantee's Injective address
amountIntegerAmount of stake granted (INJ in chain format)
+ + +
ParameterTypeDescription
granteestringthe grantee address
amountcosmossdk_io_math.Intthe amount of stake granted (INJ in chain format)
@@ -5548,75 +5992,38 @@ DEBU[0002] gas wanted: 133614 fn=func1 src="client/ch gas fee: 0.000066807 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -5630,8 +6037,8 @@ Message for grantees to claim stake grants. ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -5639,7 +6046,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -5696,26 +6103,28 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -5746,7 +6155,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -5755,27 +6164,30 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := &exchangetypes.MsgActivateStakeGrant{ + msg := &exchangev2types.MsgActivateStakeGrant{ Sender: senderAddress.String(), Granter: "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r", } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -5783,18 +6195,18 @@ func main() { ``` - - -
ParameterTypeDescriptionRequired
senderStringInjective address of the stake granteeYes
granterStringInjective address of the stake granterYes
+ + +
ParameterTypeDescriptionRequired
senderstringInjective address of the stake granteeYes
granterstringInjective address of the stake granterYes

**GrantAuthorization** - - -
ParameterTypeDescription
granteeStringGrantee's Injective address
amountIntegerAmount of stake granted (INJ in chain format)
+ + +
ParameterTypeDescription
granteestringthe grantee address
amountcosmossdk_io_math.Intthe amount of stake granted (INJ in chain format)
@@ -5818,73 +6230,36 @@ DEBU[0002] gas wanted: 133614 fn=func1 src="client/ch gas fee: 0.000066807 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_chainstream.md b/source/includes/_chainstream.md index 81e0886f..541cd0c3 100644 --- a/source/includes/_chainstream.md +++ b/source/includes/_chainstream.md @@ -11,16 +11,15 @@ A filter can be specified with a list of values, generally MarketIds, Subaccount A filter can also be omitted, in this case the stream will return all the events for the specified type. In addition each filter supports a `*` wildcard to match all possible values. - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.composer import Composer +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -40,7 +39,7 @@ async def main() -> None: network = Network.testnet() client = AsyncClient(network) - composer = Composer(network=network.string()) + composer = await client.composer() subaccount_id = "0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000" @@ -95,8 +94,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -105,7 +104,7 @@ import ( "encoding/json" "fmt" - chainStreamModule "github.com/InjectiveLabs/sdk-go/chain/stream/types" + chainstreamv2 "github.com/InjectiveLabs/sdk-go/chain/stream/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" @@ -124,7 +123,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -139,47 +138,47 @@ func main() { injUsdtMarket := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" injUsdtPerpMarket := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - req := chainStreamModule.StreamRequest{ - BankBalancesFilter: &chainStreamModule.BankBalancesFilter{ + req := chainstreamv2.StreamRequest{ + BankBalancesFilter: &chainstreamv2.BankBalancesFilter{ Accounts: []string{"*"}, }, - SpotOrdersFilter: &chainStreamModule.OrdersFilter{ + SpotOrdersFilter: &chainstreamv2.OrdersFilter{ MarketIds: []string{injUsdtMarket}, SubaccountIds: []string{subaccountId}, }, - DerivativeOrdersFilter: &chainStreamModule.OrdersFilter{ + DerivativeOrdersFilter: &chainstreamv2.OrdersFilter{ MarketIds: []string{injUsdtPerpMarket}, SubaccountIds: []string{subaccountId}, }, - SpotTradesFilter: &chainStreamModule.TradesFilter{ + SpotTradesFilter: &chainstreamv2.TradesFilter{ MarketIds: []string{injUsdtMarket}, SubaccountIds: []string{"*"}, }, - SubaccountDepositsFilter: &chainStreamModule.SubaccountDepositsFilter{ + SubaccountDepositsFilter: &chainstreamv2.SubaccountDepositsFilter{ SubaccountIds: []string{subaccountId}, }, - DerivativeOrderbooksFilter: &chainStreamModule.OrderbookFilter{ + DerivativeOrderbooksFilter: &chainstreamv2.OrderbookFilter{ MarketIds: []string{injUsdtPerpMarket}, }, - SpotOrderbooksFilter: &chainStreamModule.OrderbookFilter{ + SpotOrderbooksFilter: &chainstreamv2.OrderbookFilter{ MarketIds: []string{injUsdtMarket}, }, - PositionsFilter: &chainStreamModule.PositionsFilter{ + PositionsFilter: &chainstreamv2.PositionsFilter{ SubaccountIds: []string{subaccountId}, MarketIds: []string{injUsdtPerpMarket}, }, - DerivativeTradesFilter: &chainStreamModule.TradesFilter{ + DerivativeTradesFilter: &chainstreamv2.TradesFilter{ SubaccountIds: []string{"*"}, MarketIds: []string{injUsdtPerpMarket}, }, - OraclePriceFilter: &chainStreamModule.OraclePriceFilter{ + OraclePriceFilter: &chainstreamv2.OraclePriceFilter{ Symbol: []string{"INJ", "USDT"}, }, } ctx := context.Background() - stream, err := chainClient.ChainStream(ctx, req) + stream, err := chainClient.ChainStreamV2(ctx, req) if err != nil { panic(err) } @@ -192,9 +191,8 @@ func main() { res, err := stream.Recv() if err != nil { panic(err) - return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -202,284 +200,254 @@ func main() { ``` -### Request parameters - -| Parameter | Type | Description | Required | -| -------------------------- | ------------------------ | ---------------------------------------- | -------- | -| BankBalancesFilter | BankBalancesFilter | Filter for bank balances events | No | -| SpotOrdersFilter | OrdersFilter | Filter for spot orders events | No | -| DerivativeOrdersFilter | OrdersFilter | Filter for derivative orders events | No | -| SpotTradesFilter | TradesFilter | Filter for spot trades events | No | -| SubaccountDepositsFilter | SubaccountDepositsFilter | Filter for subaccount deposits events | No | -| DerivativeOrderbooksFilter | OrderbookFilter | Filter for derivative order books events | No | -| SpotOrderbooksFilter | OrderbookFilter | Filter for spot order books events | No | -| PositionsFilter | PositionsFilter | Filter for positions events | No | -| DerivativeTradesFilter | TradesFilter | Filter for derivative trades events | No | -| OraclePriceFilter | OraclePriceFilter | Filter for oracle price events | No | + + -### BankBalancesFilter +
- Structure for filtering bank balances. +**BankBalancesFilter** -| Parameter | Type | Description | Required | -| --------- | ------------ | -------------------------- | -------- | -| Accounts | String Array | List of account addresses. | No | + + -### SubaccountDepositsFilter +
- Structure for filtering subaccount deposits. +**SubaccountDepositsFilter** -| Parameter | Type | Description | Required | -| ------------- | ------------ | ----------------------- | -------- | -| SubaccountIds | String Array | List of subaccount IDs. | No | + +
ParameterTypeDescription
subaccount_idsstring array
+ -### TradesFilter +
- Structure for filtering trades. +**TradesFilter** -| Parameter | Type | Description | Required | -| ------------- | ------------ | ----------------------- | -------- | -| SubaccountIds | String Array | List of subaccount IDs. | No | -| MarketIds | String Array | List of market IDs. | No | + + +
ParameterTypeDescription
subaccount_idsstring array
market_idsstring array
+ -### OrdersFilter +
- Structure for filtering orders. +**OrdersFilter** -| Parameter | Type | Description | Required | -| ------------- | ------------ | ----------------------- | -------- | -| SubaccountIds | String Array | List of subaccount IDs. | No | -| MarketIds | String Array | List of market IDs. | No | + + +
ParameterTypeDescription
subaccount_idsstring array
market_idsstring array
+ -### OrderbookFilter +
- Structure for filtering orderbook. +**OrderbookFilter** -| Parameter | Type | Description | Required | -| --------- | ------------ | ------------------- | -------- | -| MarketIds | String Array | List of market IDs. | No | + +
ParameterTypeDescription
market_idsstring array
+ -### PositionsFilter +
- Structure for filtering positions. +**PositionsFilter** -| Parameter | Type | Description | Required | -| ------------- | ------------ | ----------------------- | -------- | -| SubaccountIds | String Array | List of subaccount IDs. | No | -| MarketIds | String Array | List of market IDs. | No | + + +
ParameterTypeDescription
subaccount_idsstring array
market_idsstring array
+ -### OraclePriceFilter +
- Structure for filtering oracle prices. +**OraclePriceFilter** -| Parameter | Type | Description | Required | -| --------- | ------------ | ---------------- | -------- | -| Symbol | String Array | List of symbols. | No | + +
ParameterTypeDescription
symbolstring array
+ ## StreamResponse The stream response is a stream of events that are sent to the client. Each message contains a list of events that are filtered by the request parameters and it's identified by the block height. -### Response parameters - -Response structure for the data stream. - -| Parameter | Type | Description | Required | -| -------------------------- | ------------------------ | ------------------------------------- | -------- | -| BlockHeight | Integer | The current block height. | | -| BlockTime | Integer | The current block timestamp | | -| BankBalances | BankBalance Array | List of bank balances. | | -| SubaccountDeposits | SubaccountDeposits Array | List of subaccount deposits. | | -| SpotTrades | SpotTrade Array | List of spot trades. | | -| DerivativeTrades | DerivativeTrade Array | List of derivative trades. | | -| SpotOrders | SpotOrder Array | List of spot orders. | | -| DerivativeOrders | DerivativeOrder Array | List of derivative orders. | | -| SpotOrderbookUpdates | OrderbookUpdate Array | List of spot orderbook updates. | | -| DerivativeOrderbookUpdates | OrderbookUpdate Array | List of derivative orderbook updates. | | -| Positions | Position Array | List of positions. | | -| OraclePrices | OraclePrice Array | List of oracle prices. | | - -### BankBalance - -Structure for bank balances. - -| Parameter | Type | Description | Required | -| --------- | ------ | ------------------------------- | -------- | -| Account | String | The account name. | | -| Balances | Coins | The list of available balances. | | - -### SubaccountDeposits - -Structure for subaccount deposits. - -| Parameter | Type | Description | Required | -| ------------ | ------------- | ------------------ | -------- | -| SubaccountId | String | The subaccount ID. | | -| Deposits | Deposit Array | List of deposits. | | + + -### SpotTrade +
-Structure for spot trades. +**BankBalance** -| Parameter | Type | Description | Required | -| ------------------- | ------ | ------------------------------------------------- | -------- | -| MarketId | String | The market ID. | | -| IsBuy | bool | True if it is a buy, False if it is a sell. | | -| ExecutionType | String | The execution type. | | -| Quantity | Dec | The quantity of the trade. | | -| Price | Dec | The price of the trade. | | -| SubaccountId | String | The subaccount ID that executed the trade. | | -| Fee | Dec | The fee of the trade. | | -| OrderHash | String | The hash of the order. | | -| FeeRecipientAddress | String | The fee recipient address. | | -| Cid | String | Identifier for the order specified by the user | | -| TradeId | String | Unique identifier to differentiate between trades | | + + -### DerivativeTrade +
-Structure for derivative trades. +**SubaccountDeposits** -| Parameter | Type | Description | Required | -| ------------------- | ------------- | ------------------------------------------------- | -------- | -| MarketId | String | The market ID. | | -| IsBuy | bool | True if it is a buy, False if it is a sell. | | -| ExecutionType | String | The execution type. | | -| SubaccountId | String | The subaccount ID that executed the trade. | | -| PositionDelta | PositionDelta | The position delta. | | -| Payout | Dec | The payout of the trade. | | -| Fee | Dec | The fee of the trade. | | -| OrderHash | String | The hash of the order. | | -| FeeRecipientAddress | String | The fee recipient address. | | -| Cid | String | Identifier for the order specified by the user | | -| TradeId | String | Unique identifier to differentiate between trades | | + + +
ParameterTypeDescription
denomstring
deposittypes.Deposit
+ -### SpotOrder +
+ +**SpotTrade** + + + + + + + + + + + + +
ParameterTypeDescription
market_idstringthe market ID
is_buyboolwhether the trade is a buy or sell
executionTypestringthe execution type
quantitycosmossdk_io_math.LegacyDecthe quantity of the trade
pricecosmossdk_io_math.LegacyDecthe price of the trade
subaccount_idstringthe subaccount ID that executed the trade
feecosmossdk_io_math.LegacyDecthe fee of the trade
order_hashstringthe order hash
fee_recipient_addressstringthe fee recipient address
cidstringthe client order ID
trade_idstringthe trade ID
+ -Structure for spot orders. +
+ +**DerivativeTrade** + + + + + + + + + + + + +
ParameterTypeDescription
market_idstringthe market ID
is_buyboolwhether the trade is a buy or sell
executionTypestringthe execution type
subaccount_idstringthe subaccount ID
position_deltatypes.PositionDeltathe position delta of the trade
payoutcosmossdk_io_math.LegacyDecthe payout of the trade
feecosmossdk_io_math.LegacyDecthe fee of the trade
order_hashstringthe order hash
fee_recipient_addressstringthe fee recipient address
cidstringthe client order ID
trade_idstringthe trade ID
+ -| Parameter | Type | Description | Required | -| --------- | -------------- | --------------- | -------- | -| MarketId | String | The market ID. | | -| Order | SpotLimitOrder | The spot order. | | +
-### DerivativeOrder +**SpotOrderUpdate** -Structure for derivative orders. + + + + +
ParameterTypeDescription
statusOrderUpdateStatus
order_hashstring
cidstring
orderSpotOrder
+ -| Parameter | Type | Description | Required | -| --------- | -------------------- | ----------------------------------------------------------- | -------- | -| MarketId | String | The market ID. | | -| Order | DerivativeLimitOrder | The derivative order. | | -| IsMarket | bool | True if it is a market order, False if it is a limit order. | | +
-### OrderbookUpdate +**DerivativeOrderUpdate** -Structure for orderbook updates. + + + + +
ParameterTypeDescription
statusOrderUpdateStatus
order_hashstring
cidstring
orderDerivativeOrder
+ -| Parameter | Type | Description | Required | -| --------- | --------- | ---------------------- | -------- | -| Seq | Integer | The sequence number. | | -| Orderbook | Orderbook | The updated orderbook. | | +
-### Position +**OrderbookUpdate** -Structure for positions. + + +
ParameterTypeDescription
sequint64
orderbookOrderbook
+ -| Parameter | Type | Description | Required | -| ---------------------- | ------ | ---------------------------------------------------- | -------- | -| MarketId | String | The market ID. | | -| SubaccountId | String | The subaccount ID. | | -| IsLong | bool | True if it is a long position, False if it is short. | | -| Quantity | Dec | The quantity of the position. | | -| EntryPrice | Dec | The entry price of the position. | | -| Margin | Dec | The margin of the position. | | -| CumulativeFundingEntry | Dec | The cumulative funding entry of the position. | | +
-### OraclePrice +**Position** -Structure for oracle prices. + + + + + + + +
ParameterTypeDescription
market_idstringthe market ID
subaccount_idstringthe subaccount ID
isLongboolwhether the position is long or short
quantitycosmossdk_io_math.LegacyDecthe quantity of the position
entry_pricecosmossdk_io_math.LegacyDecthe entry price of the position
margincosmossdk_io_math.LegacyDecthe margin of the position
cumulative_funding_entrycosmossdk_io_math.LegacyDecthe cumulative funding entry of the position
+ -| Parameter | Type | Description | Required | -| --------- | ------ | ------------------------ | -------- | -| Symbol | String | The symbol of the price. | Yes | -| Price | Dec | The oracle price. | Yes | -| Type | String | The price type. | | +
-### SubaccountDeposit +**OraclePrice** -Structure for subaccount deposits. + + + +
ParameterTypeDescription
symbolstring
pricecosmossdk_io_math.LegacyDec
typestring
+ -| Parameter | Type | Description | Required | -| --------- | ------- | -------------------------------- | -------- | -| Denom | String | The denomination of the deposit. | | -| Deposit | Deposit | The deposit details. | | +
-### Deposit +**OrderUpdateStatus** -Structure for deposit details. + + + + +
CodeName
0Unspecified
1Booked
2Matched
3Cancelled
+ -| Parameter | Type | Description | Required | -| ---------------- | ---- | ------------------------------------- | -------- | -| AvailableBalance | Dec | The available balance in the deposit. | | -| TotalBalance | Dec | The total balance in the deposit. | | +
-### SpotLimitOrder +**SpotOrder** -Structure for spot limit orders. + + +
ParameterTypeDescription
market_idstring
ordertypes.SpotLimitOrder
+ -| Parameter | Type | Description | Required | -| ------------ | ----------------- | --------------------------------------- | -------- | -| OrderInfo | OrderInfo | Information about the order. | | -| OrderType | OrderType | The order type. | | -| Fillable | Dec | The remaining fillable quantity. | | -| TriggerPrice | Dec (optional) | The trigger price for stop/take orders. | | -| OrderHash | []byte (optional) | The hash of the order. | | +
-### DerivativeLimitOrder +**DerivativeOrder** -Structure for derivative limit orders. + + + +
ParameterTypeDescription
market_idstringthe market ID
ordertypes.DerivativeLimitOrderthe derivative order details
is_marketboolwhether the order is a market order
+ -| Parameter | Type | Description | Required | -| ------------ | ----------------- | --------------------------------------- | -------- | -| OrderInfo | OrderInfo | Information about the order. | | -| OrderType | OrderType | The order type. | | -| Margin | Dec | The margin used by the order. | | -| Fillable | Dec | The remaining fillable quantity. | | -| TriggerPrice | Dec (optional) | The trigger price for stop/take orders. | | -| OrderHash | []byte (optional) | The hash of the order. | | +
-### OrderInfo +**SpotLimitOrder** -Structure for order information. + + + + + + +
ParameterTypeDescription
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
fillablecosmossdk_io_math.LegacyDecthe amount of the quantity remaining fillable
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders
order_hashbyte arrayorder hash
expiration_blockint64expiration block is the block number at which the order will expire
+ -| Parameter | Type | Description | Required | -| ------------ | ------ | ---------------------------------------------- | -------- | -| SubaccountId | String | The subaccount ID of the order creator. | | -| FeeRecipient | String | The fee recipient address for the order. | | -| Price | Dec | The price of the order. | | -| Quantity | Dec | The quantity of the order. | | -| Cid | String | Identifier for the order specified by the user | | +
-### OrderType +**DerivativeLimitOrder** -Any of the possible [order types](#overview-order-types) + + + + + + + +
ParameterTypeDescription
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order
fillablecosmossdk_io_math.LegacyDecthe amount of the quantity remaining fillable
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders
order_hashbyte array
expiration_blockint64expiration block is the block number at which the order will expire
+ -### Orderbook +
-Structure for the orderbook. +**Orderbook** -| Parameter | Type | Description | Required | -| ---------- | ----------- | -------------------- | -------- | -| MarketId | String | The market ID. | | -| BuyLevels | Level Array | List of buy levels. | | -| SellLevels | Level Array | List of sell levels. | | + + + +
ParameterTypeDescription
market_idstring
buy_levelstypes.Level array
sell_levelstypes.Level array
+ -### Level +
-Structure for the orderbook levels. +**Level** -| Parameter | Type | Description | Required | -| --------- | ---- | -------------------------- | -------- | -| P | Dec | The price of the level. | | -| Q | Dec | The quantity of the level. | | \ No newline at end of file + + +
ParameterTypeDescription
pcosmossdk_io_math.LegacyDecprice (in human readable format)
qcosmossdk_io_math.LegacyDecquantity (in human readable format)
+ diff --git a/source/includes/_changelog.md b/source/includes/_changelog.md index d8469059..c43e73f2 100644 --- a/source/includes/_changelog.md +++ b/source/includes/_changelog.md @@ -1,7 +1,16 @@ # Change Log +## 2025-07-29 +- Updated all messages to reflect the changes included in the chain version 1.16, and the Indexer for that chain version +- Added documentation for `erc20` modules endpoints +- Added documentation for `evm` modules endpoints +- Updated all `exchange` module examples to query the exchange v2 endpoints and send exchange v2 messages +- New GTB orders functionality (Good-Til-Block orders) +- Python SDK v1.11.0 +- Go SDK v1.58.0 + ## 2025-04-21 -- Added documentation for `TXFees` module's endpoints +- Added documentation for `TXFees` modules endpoints - Updated all messages to reflect the changes included in the chain version 1.15, and the Indexer for that chain version - Python SDK v1.10.0 - Go SDK v1.57.0 diff --git a/source/includes/_clients.md b/source/includes/_clients.md index b56f3179..eacd77cf 100644 --- a/source/includes/_clients.md +++ b/source/includes/_clients.md @@ -23,209 +23,160 @@ Install injective-py from PyPI using `pip`. ```bash pip install injective-py ``` - **Reference** [InjectiveLabs/sdk-python](https://github.com/InjectiveLabs/sdk-python) -### Markets and Tokens information -> Example - Traditional Composer instantiation +### Choose Exchange V1 or Exchange V2 queries -```python -from pyinjective.composer import Composer -from pyinjective.transaction import Transaction -from pyinjective.core.network import Network +The Injective Python SDK provides two different clients for interacting with the exchange: +> Example - Exchange V1 Client -network = Network.testnet() -composer = Composer(network=network.string()) +```python +from injective.async_client import AsyncClient +from injective.network import Network + +async def main(): + # Initialize client with mainnet + client = AsyncClient(network=Network.mainnet()) + # Or use testnet + # client = AsyncClient(network=Network.testnet()) + # Use V1 exchange queries here ``` -Python SDK traditionally relied on local configuration files to get the list of available markets and tokens in each network (mainnet, testnet and devnet). +1. **Exchange V1 Client** (`async_client` module): + - Use this client if you need to interact with the original Injective Exchange API + - Import using: `from injective.async_client import AsyncClient` + - Suitable for applications that need to maintain compatibility with the original exchange interface -Since **version 0.8** the SDK is able also to get the markets and tokens information directly from the chain data (through the Indexer process). -The benefit of this approach is that it is not necessary to update the SDK version when a new market is created in the chain or a new token is added. +> Example - Exchange V2 Client -- To use the markets and tokens information from the local configuration files, create the Composer instance in the traditional way +```python +from injective.async_client_v2 import AsyncClient +from injective.network import Network + +async def main(): + # Initialize client with mainnet + client = AsyncClient(network=Network.mainnet()) + # Or use testnet + # client = AsyncClient(network=Network.testnet()) + # Use V2 exchange queries here +``` -
-
+2. **Exchange V2 Client** (`async_client_v2` module): + - Use this client for the latest exchange features and improvements + - Import using: `from injective.async_client_v2 import AsyncClient` + - Recommended for new applications and when you need access to the latest exchange features -> Example - Get the composer instance through the AsyncClient -```python -from pyinjective.composer import Composer as ProtoMsgComposer -from pyinjective.async_client import AsyncClient -from pyinjective.transaction import Transaction -from pyinjective.core.network import Network +Both clients provide similar interfaces but with different underlying implementations. Choose V2 for new projects unless you have specific requirements for V1 compatibility. +**Market Format Differences**: -network = Network.testnet() -client = AsyncClient(network) -composer = await client.composer() -``` +- V1 AsyncClient: Markets are initialized with values in chain format (raw blockchain values) +- V2 AsyncClient: Markets are initialized with values in human-readable format (converted to standard decimal numbers) -- To get the markets and tokens information directly from the chain, create the Composer instance through the AsyncClient +**Exchange Endpoint Format Differences**: +- V1 Exchange endpoints: All values (amounts, prices, margins, notionals) are returned in chain format +- V2 Exchange endpoints: + - Human-readable format for: amounts, prices, margins, and notionals + - Chain format for: deposit-related information (to maintain consistency with the Bank module) -By default the AsyncClient and the Composer will only initialize the tokens that are part of an active market. In order to let them use any of the tokens available in the chain, the user has to execute the `initialize_tokens_from_chain_denoms` in the AsyncClient before the creation of the Composer. + -> Example - Initialize with all tokens from the chain -```python -from pyinjective.composer import Composer as ProtoMsgComposer -from pyinjective.async_client import AsyncClient -from pyinjective.transaction import Transaction -from pyinjective.core.network import Network +## Golang Client +**1. Create your own client repo and go.mod file** -network = Network.testnet() -client = AsyncClient(network) -await client.initialize_tokens_from_chain_denoms() -composer = await client.composer() -``` +`go mod init foo` -## Golang Client +**2. Import SDK into go.mod** -### 1. Create your own client repo and go.mod file + + require ( + github.com/InjectiveLabs/sdk-go v1.58.0 + ) + -go mod init foo +*Consult the sdk-go repository to find the latest release and replace the version in your go.mod file. Version v1.39.4 is only an example and must be replaced with the newest release* -### 2. Import SDK into go.mod +**3. Download the package** -module foo +Download the package using `go mod download` -go 1.18 +`go mod download github.com/InjectiveLabs/sdk-go` -require ( - github.com/InjectiveLabs/sdk-go v1.39.4 -) -*Consult the sdk-go repository to find the latest release and replace the version in your go.mod file. Version v1.39.4 is only an example and must be replaced with the newest release* +### Choose Exchange V1 or Exchange V2 queries -### 3. Download the package +The SDK provides two different clients for interacting with the Injective Exchange: -Download the package using `go mod download` +> Example - ChainClient -```bash -go mod download github.com/InjectiveLabs/sdk-go +```go +// For Exchange V1 +client := chainclient.NewChainClient(...) + +// For Exchange V2 +clientV2 := chainclient.NewChainClientV2(...) ``` -### Markets and Tokens information +- `ChainClient`: Use this client if you need to interact with Exchange V1. This client maintains compatibility with the original exchange implementation and is suitable for existing applications that haven't migrated to V2 yet. Note that this client will not include any new endpoints added to the Exchange module - for access to new features, you should migrate to V2. -> Example - Traditional ChainClient instantiation +- `ChainClientV2`: Use this client for all new applications or when you need to interact with Exchange V2 features. This client provides access to the latest exchange functionality and improvements, including all new endpoints added to the Exchange module. -```go -package main +**Markets Assistant** -import ( - "fmt" - "github.com/InjectiveLabs/sdk-go/client" - "os" +> Example - Markets Assistant - "github.com/InjectiveLabs/sdk-go/client/common" +```go +// For Exchange V1 markets +marketsAssistant, err := chain.NewMarketsAssistant(ctx, client) // ChainClient instance +if err != nil { + // Handle error +} - chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" -) +// For Exchange V2 markets +marketsAssistantV2, err := chain.NewHumanReadableMarketsAssistant(ctx, clientV2) // ChainClientV2 instance +if err != nil { + // Handle error +} +``` -func main() { - network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") - if err != nil { - panic(err) - } +The SDK provides a Markets Assistant to help you interact with markets in both V1 and V2. Here's how to create instances for each version - senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( - os.Getenv("HOME")+"/.injectived", - "injectived", - "file", - "inj-user", - "12345678", - "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided - false, - ) +The Markets Assistant provides helper methods to: - if err != nil { - panic(err) - } +- Fetch market information +- Get market prices +- Query orderbooks +- Access market statistics - // initialize grpc client - clientCtx, err := chainclient.NewClientContext( - network.ChainId, - senderAddress.String(), - cosmosKeyring, - ) - if err != nil { - fmt.Println(err) - } - clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) +Make sure to use the correct version of the Markets Assistant that matches your ChainClient version to ensure compatibility. The V1 assistant (`NewMarketsAssistant`) will only work with V1 markets, while the V2 assistant (`NewHumanReadableMarketsAssistant`) provides access to V2 markets and their features. - chainClient, err := chainclient.NewChainClient( - clientCtx, - network, - common.OptionGasPrices(client.DefaultGasPriceWithDenom), - ) +**Format Differences** - if err != nil { - fmt.Println(err) - } +There are important format differences between V1 and V2 endpoints: -} +- **Exchange V1**: All values (amounts, prices, margins, notionals) are returned in chain format (raw numbers) +- **Exchange V2**: Most values are returned in human-readable format for better usability: + - Amounts, prices, margins, and notionals are in human-readable format + - Deposit-related information remains in chain format to maintain consistency with the Bank module + +This format difference is one of the key improvements in V2, making it easier to work with market data without manual conversion. -``` -Go SDK traditionally relied on local configuration files to get the list of available markets and tokens in each network (mainnet, testnet and devnet). +### Markets and Tokens information Since **version 1.49** the SDK is able also to get the markets and tokens information directly from the chain data (through the Indexer process). The benefit of this approach is that it is not necessary to update the SDK version when a new market is created in the chain or a new token is added. -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- > Example - Get markets and tokens from Indexer (ExchangeClient) ```go diff --git a/source/includes/_derivatives.md b/source/includes/_derivatives.md index 23fe6694..792f5e1b 100644 --- a/source/includes/_derivatives.md +++ b/source/includes/_derivatives.md @@ -11,12 +11,12 @@ Get the level 3 aggregated order book for a derivative market ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -38,8 +38,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -47,7 +47,6 @@ import ( "context" "encoding/json" "fmt" - "os" "github.com/InjectiveLabs/sdk-go/client" @@ -58,7 +57,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -89,7 +88,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -103,12 +102,12 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchL3DerivativeOrderBook(ctx, marketId) + res, err := chainClient.FetchL3DerivativeOrderbook(ctx, marketId) if err != nil { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -136,8 +135,8 @@ func main() { **TrimmedLimitOrder** - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
+
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
order_hashStringThe order hash
subaccount_idStringSubaccount ID that created the order
@@ -152,12 +151,12 @@ Retrieves a derivative market's mid-price ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -179,8 +178,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -198,7 +197,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -229,7 +228,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -248,7 +247,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -264,9 +263,9 @@ func main() { ``` json { - "midPrice":"36928150000000000000000000", - "bestBuyPrice":"36891200000000000000000000", - "bestSellPrice":"36965100000000000000000000" + "midPrice": "19.49495", + "bestBuyPrice": "19.2929", + "bestSellPrice": "19.697" } ``` @@ -286,12 +285,12 @@ Retrieves a derivative market's orderbook by marketID ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -317,8 +316,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -339,7 +338,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -370,7 +369,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -391,7 +390,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -409,32 +408,32 @@ func main() { ``` json { - "buysPriceLevel":[ - { - "p":"36891200000000000000000000", - "q":"3253632000000000000000" - }, - { - "p":"36860900000000000000000000", - "q":"500000000000000000" - } - ], - "sellsPriceLevel":[ - { - "p":"36965100000000000000000000", - "q":"60344815000000000000000" - }, - { - "p":"37057500000000000000000000", - "q":"60194349800000000000000" - } - ] + "buysPriceLevel": [ + { + "p": "19.2929", + "q": "0.0333" + }, + { + "p": "19.1837", + "q": "0.029" + } + ], + "sellsPriceLevel": [ + { + "p": "19.697", + "q": "0.0333" + }, + { + "p": "19.899", + "q": "0.0333" + } + ] } ``` - -
ParameterTypeDescription
buys_price_levelLevel ArrayBid side entries
sells_price_levelLevel ArrayAsk side entries
+ +
ParameterTypeDescription
buys_price_levelTrimmedLimitOrder ArrayBid side entries
sells_price_levelTrimmedLimitOrder ArrayAsk side entries

@@ -442,8 +441,8 @@ func main() { **Level** - -
ParameterTypeDescription
pDecimalPrice
qDecimalQuantity
+ +
ParameterTypeDescription
pDecimalPrice (in human redable format)
qDecimalQuantity (in human redable format)
@@ -456,8 +455,8 @@ Retrieves a trader's derivative orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -465,7 +464,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -499,8 +498,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -518,7 +517,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -549,7 +548,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -569,7 +568,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -601,10 +600,10 @@ func main() { **TrimmedDerivativeLimitOrder** - - - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
marginDecimalOrder margin
fillableDecimalThe remaining fillable amount of the order
+ + +
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
marginDecimalOrder margin (in human redable format)
fillableDecimalThe remaining fillable amount of the order (in human redable format)
is_buyBooleanTrue if the order is a buy order
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
@@ -620,8 +619,8 @@ Retrieves all account address' derivative orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -629,7 +628,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -661,8 +660,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -680,7 +679,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -711,7 +710,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -730,7 +729,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -762,10 +761,10 @@ func main() { **TrimmedDerivativeLimitOrder** - - - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
marginDecimalOrder margin
fillableDecimalThe remaining fillable amount of the order
+ + +
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
marginDecimalOrder margin (in human redable format)
fillableDecimalThe remaining fillable amount of the order (in human redable format)
is_buyBooleanTrue if the order is a buy order
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
@@ -781,8 +780,8 @@ Retrieves a trader's derivative orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -790,7 +789,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -825,8 +824,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -844,7 +843,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -875,7 +874,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -896,7 +895,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -929,10 +928,10 @@ func main() { **TrimmedDerivativeLimitOrder** - - - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
marginDecimalOrder margin
fillableDecimalThe remaining fillable amount of the order
+ + +
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
marginDecimalOrder margin (in human redable format)
fillableDecimalThe remaining fillable amount of the order (in human redable format)
is_buyBooleanTrue if the order is a buy order
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
@@ -948,8 +947,8 @@ Retrieves a trader's transient derivative orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -957,7 +956,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -991,8 +990,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1010,7 +1009,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1041,7 +1040,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1061,7 +1060,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1093,10 +1092,10 @@ func main() { **TrimmedDerivativeLimitOrder** - - - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
marginDecimalOrder margin
fillableDecimalThe remaining fillable amount of the order
+ + +
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
marginDecimalOrder margin (in human redable format)
fillableDecimalThe remaining fillable amount of the order (in human redable format)
is_buyBooleanTrue if the order is a buy order
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
@@ -1112,12 +1111,12 @@ Retrieves a list of derivative markets ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1140,8 +1139,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1160,7 +1159,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1191,7 +1190,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1212,7 +1211,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1230,44 +1229,52 @@ func main() { ``` json { - "markets":[ - { - "market":{ - "ticker":"INJ/USDT PERP", - "oracleBase":"0x2d9315a88f3019f8efa88dfe9c0f0843712da0bac814461e27733f6b83eb51b3", - "oracleQuote":"0x1fc18861232290221461220bd4e2acd1dcdfbc89c84092c93c18bdc7756c1588", - "oracleType":"Pyth", - "oracleScaleFactor":6, - "quoteDenom":"peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", - "marketId":"0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", - "initialMarginRatio":"50000000000000000", - "maintenanceMarginRatio":"20000000000000000", - "makerFeeRate":"-100000000000000", - "takerFeeRate":"1000000000000000", - "relayerFeeShareRate":"400000000000000000", - "isPerpetual":true, - "status":"Active", - "minPriceTickSize":"100000000000000000000", - "minQuantityTickSize":"100000000000000", - "quoteDecimals":6, - }, - "perpetualInfo":{ - "marketInfo":{ - "marketId":"0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", - "hourlyFundingRateCap":"625000000000000", - "hourlyInterestRate":"4166660000000", - "nextFundingTimestamp":"1709546400", - "fundingInterval":"3600" - }, - "fundingInfo":{ - "cumulativeFunding":"-44519773449439313111470", - "cumulativePrice":"0", - "lastTimestamp":"1709542800" - } - }, - "markPrice":"39829277195482383939000000" - } - ] + "markets": [ + { + "market": { + "ticker": "INJ/USDT PERP", + "oracle_base": "0x2d9315a88f3019f8efa88dfe9c0f0843712da0bac814461e27733f6b83eb51b3", + "oracle_quote": "0x1fc18861232290221461220bd4e2acd1dcdfbc89c84092c93c18bdc7756c1588", + "oracle_type": 9, + "quote_denom": "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", + "market_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + "initial_margin_ratio": "0.083333000000000000", + "maintenance_margin_ratio": "0.060000000000000000", + "maker_fee_rate": "-0.000100000000000000", + "taker_fee_rate": "0.000500000000000000", + "relayer_fee_share_rate": "0.400000000000000000", + "isPerpetual": true, + "status": 1, + "min_price_tick_size": "0.000100000000000000", + "min_quantity_tick_size": "0.000100000000000000", + "min_notional": "0.000000000001000000", + "quote_decimals": 6, + "reduce_margin_ratio": "0.249999000000000000" + }, + "Info": { + "perpetual_info": { + "market_info": { + "market_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + "hourly_funding_rate_cap": "0.000625000000000000", + "hourly_interest_rate": "0.000004166660000000", + "next_funding_timestamp": 1748962800, + "funding_interval": 3600 + }, + "funding_info": { + "cumulative_funding": "0.142734053117809236", + "cumulative_price": "0.000000000000000000", + "last_timestamp": 1748959200 + } + } + }, + "mark_price": "12.864774536812149196", + "mid_price_and_tob": { + "mid_price": "19.494950000000000000", + "best_buy_price": "19.292900000000000000", + "best_sell_price": "19.697000000000000000" + } + } + ] } ``` @@ -1282,7 +1289,7 @@ func main() { - +
ParameterTypeDescription
marketDerivativeMarketMarket basic information
infoPerpetualMarketState or ExpiryFuturesMarketInfoSpecific information for the perpetual or expiry futures market
mark_priceDecimalThe market mark price
mark_priceDecimalThe market mark price (in human redable format)
mid_price_and_tobMidPriceAndTOBThe mid price for this market and the best ask and bid orders
@@ -1305,9 +1312,9 @@ func main() { relayer_fee_share_rateDecimalPercentage of the transaction fee shared with the relayer in a derivative market is_perpetualBooleanTrue if the market is a perpetual market. False if the market is an expiry futures market statusMarketStatusStatus of the market -min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market -min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market -min_notionalDecimalMinimum notional (in quote asset) required for orders in the market +min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market (in human redable format) +min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market (in human redable format) +min_notionalDecimalMinimum notional (in quote asset) required for orders in the market (in human redable format) adminStringCurrent market admin's address admin_permissionsIntegerLevel of admin permissions (the permission number is a result of adding up all individual permissions numbers) quote_decimalsIntegerNumber of decimals used for the quote token @@ -1317,7 +1324,7 @@ func main() { **OracleType** - + @@ -1329,14 +1336,15 @@ func main() { -
CodeName
0Unspecified
1Band
2PriceFeed
8Uma
9Pyth
10BandIBC
11Provider
+11Provider +12Stork
**MarketStatus** - + @@ -1371,7 +1379,7 @@ func main() {
CodeName
0Unspecified
1Active
2Paused
- +
ParameterTypeDescription
cumulative_fundingDecimalThe market's cumulative funding
cumulative_priceDecimalThe cumulative price for the current hour up to the last timestamp
cumulative_priceDecimalThe cumulative price for the current hour up to the last timestamp (in human redable format)
last_timestampIntegerLast funding timestamp in seconds
@@ -1383,15 +1391,25 @@ func main() { - -
ParameterTypeDescription
market_idStringThe market ID
expiration_timestampIntegerThe market's expiration time in seconds
twap_start_timestampIntegerDefines the start time of the TWAP calculation window
expiration_twap_start_price_cumulativeDecimalDefines the cumulative price for the start of the TWAP window
settlement_priceDecimalThe settlement price
+expiration_twap_start_price_cumulativeDecimalDefines the cumulative price for the start of the TWAP window (in human redable format) +settlement_priceDecimalThe settlement price (in human redable format) + + +
+ +**MidPriceAndTOB** + + + + +
ParameterTypeDescription
mid_priceDecimalMarket's mid price (in human redable format)
best_buy_priceDecimalMarket's best buy price (in human redable format)
best_sell_priceDecimalMarket's best sell price (in human redable format)

**AdminPermission** - + @@ -1400,8 +1418,45 @@ func main() {
CodeName
1Ticker Permission
2Min Price Tick Size Permission
4Min Quantity Tick Size Permission
32Maintenance Margin Ratio Permission
- - + +## DerivativeMarket + +Retrieves a derivative market by ticker + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + derivative_market = await client.fetch_chain_derivative_market( + market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + ) + print(derivative_market) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + ```go package main @@ -1420,7 +1475,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1451,7 +1506,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1470,7 +1525,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1486,42 +1541,45 @@ func main() { ``` json { - "market":{ - "market":{ - "ticker":"INJ/USDT PERP", - "oracleBase":"0x2d9315a88f3019f8efa88dfe9c0f0843712da0bac814461e27733f6b83eb51b3", - "oracleQuote":"0x1fc18861232290221461220bd4e2acd1dcdfbc89c84092c93c18bdc7756c1588", - "oracleType":"Pyth", - "oracleScaleFactor":6, - "quoteDenom":"peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", - "marketId":"0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", - "initialMarginRatio":"50000000000000000", - "maintenanceMarginRatio":"20000000000000000", - "makerFeeRate":"-100000000000000", - "takerFeeRate":"1000000000000000", - "relayerFeeShareRate":"400000000000000000", - "isPerpetual":true, - "status":"Active", - "minPriceTickSize":"100000000000000000000", - "minQuantityTickSize":"100000000000000" - "quoteDecimals":6, - }, - "perpetualInfo":{ - "marketInfo":{ - "marketId":"0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", - "hourlyFundingRateCap":"625000000000000", - "hourlyInterestRate":"4166660000000", - "nextFundingTimestamp":"1709553600", - "fundingInterval":"3600" - }, - "fundingInfo":{ - "cumulativeFunding":"-44192284639015238855564", - "cumulativePrice":"0", - "lastTimestamp":"1709550000" - } - }, - "markPrice":"39011901904676818317000000" - } + "market": { + "market": { + "ticker": "INJ/USDT PERP", + "oracle_base": "0x2d9315a88f3019f8efa88dfe9c0f0843712da0bac814461e27733f6b83eb51b3", + "oracle_quote": "0x1fc18861232290221461220bd4e2acd1dcdfbc89c84092c93c18bdc7756c1588", + "oracle_type": 9, + "quote_denom": "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", + "market_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + "initial_margin_ratio": "0.083333000000000000", + "maintenance_margin_ratio": "0.060000000000000000", + "maker_fee_rate": "-0.000100000000000000", + "taker_fee_rate": "0.000500000000000000", + "relayer_fee_share_rate": "0.400000000000000000", + "isPerpetual": true, + "status": 1, + "min_price_tick_size": "0.000100000000000000", + "min_quantity_tick_size": "0.000100000000000000", + "min_notional": "0.000000000001000000", + "quote_decimals": 6, + "reduce_margin_ratio": "0.249999000000000000" + }, + "Info": { + "perpetual_info": { + "market_info": { + "market_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + "hourly_funding_rate_cap": "0.000625000000000000", + "hourly_interest_rate": "0.000004166660000000", + "next_funding_timestamp": 1748962800, + "funding_interval": 3600 + }, + "funding_info": { + "cumulative_funding": "0.142734053117809236", + "cumulative_price": "0.000000000000000000", + "last_timestamp": 1748959200 + } + } + }, + "mark_price": "12.824150042260121341" + } } ``` @@ -1536,7 +1594,7 @@ func main() { - +
ParameterTypeDescription
marketDerivativeMarketMarket basic information
infoPerpetualMarketState or ExpiryFuturesMarketInfoSpecific information for the perpetual or expiry futures market
mark_priceDecimalThe market mark price
mark_priceDecimalThe market mark price (in human redable format)
mid_price_and_tobMidPriceAndTOBThe mid price for this market and the best ask and bid orders
@@ -1559,9 +1617,9 @@ func main() { relayer_fee_share_rateDecimalPercentage of the transaction fee shared with the relayer in a derivative market is_perpetualBooleanTrue if the market is a perpetual market. False if the market is an expiry futures market statusMarketStatusStatus of the market -min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market -min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market -min_notionalDecimalMinimum notional (in quote asset) required for orders in the market +min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market (in human redable format) +min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market (in human redable format) +min_notionalDecimalMinimum notional (in quote asset) required for orders in the market (in human redable format) adminStringCurrent market admin's address admin_permissionsIntegerLevel of admin permissions (the permission number is a result of adding up all individual permissions numbers) quote_decimalsIntegerNumber of decimals used for the quote token @@ -1571,7 +1629,7 @@ func main() { **OracleType** - + @@ -1583,14 +1641,15 @@ func main() { -
CodeName
0Unspecified
1Band
2PriceFeed
8Uma
9Pyth
10BandIBC
11Provider
+11Provider +12Stork
**MarketStatus** - + @@ -1625,7 +1684,7 @@ func main() {
CodeName
0Unspecified
1Active
2Paused
- +
ParameterTypeDescription
cumulative_fundingDecimalThe market's cumulative funding
cumulative_priceDecimalThe cumulative price for the current hour up to the last timestamp
cumulative_priceDecimalThe cumulative price for the current hour up to the last timestamp (in human redable format)
last_timestampIntegerLast funding timestamp in seconds
@@ -1637,15 +1696,25 @@ func main() { - -
ParameterTypeDescription
market_idStringThe market ID
expiration_timestampIntegerThe market's expiration time in seconds
twap_start_timestampIntegerDefines the start time of the TWAP calculation window
expiration_twap_start_price_cumulativeDecimalDefines the cumulative price for the start of the TWAP window
settlement_priceDecimalThe settlement price
+expiration_twap_start_price_cumulativeDecimalDefines the cumulative price for the start of the TWAP window (in human redable format) +settlement_priceDecimalThe settlement price (in human redable format) + + +
+ +**MidPriceAndTOB** + + + + +
ParameterTypeDescription
mid_priceDecimalMarket's mid price (in human redable format)
best_buy_priceDecimalMarket's best buy price (in human redable format)
best_sell_priceDecimalMarket's best sell price (in human redable format)

**AdminPermission** - + @@ -1654,8 +1723,45 @@ func main() {
CodeName
1Ticker Permission
2Min Price Tick Size Permission
4Min Quantity Tick Size Permission
32Maintenance Margin Ratio Permission
- - + +## DerivativeMarketAddress + +Retrieves a derivative market's corresponding address for fees that contribute to the market's insurance fund + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + address = await client.fetch_derivative_market_address( + market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + ) + print(address) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + ```go package main @@ -1674,7 +1780,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1705,7 +1811,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1724,7 +1830,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1740,8 +1846,8 @@ func main() { ``` json { - "address":"inj1zlh5sqevkfphtwnu9cul8p89vseme2eqt0snn9", - "subaccountId":"0x17ef48032cb24375ba7c2e39f384e56433bcab20000000000000000000000000" + "address": "inj1zlh5sqevkfphtwnu9cul8p89vseme2eqt0snn9", + "subaccount_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20000000000000000000000000" } ``` @@ -1760,12 +1866,12 @@ Retrieves the entire exchange module's positions ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1785,8 +1891,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1805,7 +1911,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1836,7 +1942,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1853,7 +1959,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1868,28 +1974,28 @@ No parameters ``` json { "state":[ - { - "subaccountId":"0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", - "marketId":"0x0f03542809143c7e5d3c22f56bc6e51eb2c8bab5009161b58f6f468432dfa196", - "position":{ - "isLong":true, - "quantity":"258750000000000000000", - "entryPrice":"24100496718773416724721614", - "margin":"6777476791762608353694085318", - "cumulativeFundingEntry":"50154448152800501378128" - } - }, - { - "subaccountId":"0xd28d1e9bc2d5a00e5e17f82fa6d4a7b0f4f034de000000000000000000000000", - "marketId":"0x0f03542809143c7e5d3c22f56bc6e51eb2c8bab5009161b58f6f468432dfa196", - "position":{ - "quantity":"258750000000000000000", - "entryPrice":"23962425204761235933835394", - "margin":"6044298532028028581333461495", - "cumulativeFundingEntry":"50154448152800501378128", - "isLong":false - } - } + { + "subaccount_id": "0x90b61ab108ad861a68a763eb7fd9868737678ed5000000000000000000000000", + "market_id": "0x0f03542809143c7e5d3c22f56bc6e51eb2c8bab5009161b58f6f468432dfa196", + "position": { + "isLong": true, + "quantity": "0.000100000000000000", + "entry_price": "32.256800000000000000", + "margin": "0.004249000000000000", + "cumulative_funding_entry": "1.271877043435469720" + } + }, + { + "subaccount_id": "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", + "market_id": "0x0f03542809143c7e5d3c22f56bc6e51eb2c8bab5009161b58f6f468432dfa196", + "position": { + "isLong": true, + "quantity": "258.750000000000000000", + "entry_price": "24.100496718773416725", + "margin": "6777.476791762608353694", + "cumulative_funding_entry": "0.050154448152800501" + } + } ] } ``` @@ -1921,6 +2027,172 @@ No parameters +## PositionsInMarket + +Retrieves all positions in market + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" + positions = await client.fetch_chain_positions_in_market(market_id=market_id) + print(json.dumps(positions, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + + "os" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" + + res, err := chainClient.FetchChainPositionsInMarket(ctx, marketId) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + + +
ParameterTypeDescriptionRequired
subaccount_idstringthe subaccount IDYes
market_idstringthe market IDYes
+ + +### Response Parameters +> Response Example: + +``` json +{ + "state": [ + { + "subaccount_id": "0x0000007c60fab7a70c2ae0ebe437f3726b05e7eb000000000000000000000000", + "market_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + "position": { + "quantity": "0.087829315829932072", + "entry_price": "26.453271813315285838", + "margin": "1.156098565040366061", + "cumulative_funding_entry": "-0.259896600932507160" + } + }, + { + "subaccount_id": "0x0000040f1111c5c3d2037940658ee770bb37e0a2000000000000000000000000", + "market_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + "position": { + "isLong": true, + "quantity": "0.000068500966722584", + "entry_price": "12.293600000000000000", + "margin": "0.000422337168093583", + "cumulative_funding_entry": "0.001394965993845972" + } + } + ] +} +``` + + +
ParameterTypeDescription
statePosition
+ + +
+ +**Position** + + + + + + +
ParameterTypeDescription
isLongboolTrue if the position is long. False if the position is short.
quantitycosmossdk_io_math.LegacyDecThe quantity of the position (in human readable format)
entry_pricecosmossdk_io_math.LegacyDecThe entry price of the position (in human readable format)
margincosmossdk_io_math.LegacyDecThe margin of the position (in human readable format)
cumulative_funding_entrycosmossdk_io_math.LegacyDecThe cumulative funding
+ + + ## SubaccountPositions Retrieves subaccount's positions @@ -1930,8 +2202,8 @@ Retrieves subaccount's positions ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1939,7 +2211,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1972,8 +2244,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1992,7 +2264,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2023,7 +2295,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2042,7 +2314,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2058,63 +2330,61 @@ func main() { ``` json { - "state":[ - { - "subaccountId":"0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", - "marketId":"0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", - "position":{ - "quantity":"3340193358036765108", - "entryPrice":"36571100000000000000000000", - "margin":"122195236794397342072018650", - "cumulativeFundingEntry":"-252598128590449182271444", - "isLong":false - } - }, - { - "subaccountId":"0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", - "marketId":"0x95698a9d8ba11660f44d7001d8c6fb191552ece5d9141a05c5d9128711cdc2e0", - "position":{ - "isLong":true, - "quantity":"135686990000000000000000", - "entryPrice":"22530000000000000000000000", - "margin":"636295890792648990477285777577", - "cumulativeFundingEntry":"547604913674998202455064" - } - }, - { - "subaccountId":"0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", - "marketId":"0xba9c96a1a9cc226cfe6bd9bca3a433e396569d1955393f38f2ee728cfda7ec58", - "position":{ - "quantity":"49610000000000000000", - "entryPrice":"132668911285488007767214817", - "margin":"6506890715472807452489590330", - "cumulativeFundingEntry":"1853558761901071670120617", - "isLong":false - } - }, - { - "subaccountId":"0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", - "marketId":"0xd97d0da6f6c11710ef06315971250e4e9aed4b7d4cd02059c9477ec8cf243782", - "position":{ - "quantity":"1000000000000000000", - "entryPrice":"10700000000000000000000000", - "margin":"10646500000000000000000000", - "cumulativeFundingEntry":"452362068840099307543671", - "isLong":false - } - }, - { - "subaccountId":"0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", - "marketId":"0xe185b08a7ccd830a94060edd5e457d30f429aa6f0757f75a8b93aa611780cfac", - "position":{ - "quantity":"71000000000000000000", - "entryPrice":"1282490277777777777777778", - "margin":"87823626715436695150716328", - "cumulativeFundingEntry":"4419299319189937712262", - "isLong":false - } - } - ] + "state": [ + { + "subaccount_id": "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", + "market_id": "0x0f03542809143c7e5d3c22f56bc6e51eb2c8bab5009161b58f6f468432dfa196", + "position": { + "isLong": true, + "quantity": "258.750000000000000000", + "entry_price": "24.100496718773416725", + "margin": "6777.476791762608353694", + "cumulative_funding_entry": "0.050154448152800501" + } + }, + { + "subaccount_id": "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", + "market_id": "0x155576f660b3b6116c1ab7a42fbf58a95adf11b3061f88f81bc8df228e7ac934", + "position": { + "quantity": "0.000000642507772481", + "entry_price": "2126.366900000000000000", + "margin": "0.000698771862410178", + "cumulative_funding_entry": "68.937815618854366506" + } + }, + { + "subaccount_id": "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", + "market_id": "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", + "position": { + "isLong": true, + "quantity": "4001.268237974374735585", + "entry_price": "38.219387300439508994", + "margin": "149511.194761579584705663", + "cumulative_funding_entry": "1.164901749616683959" + } + }, + { + "subaccount_id": "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", + "market_id": "0x95698a9d8ba11660f44d7001d8c6fb191552ece5d9141a05c5d9128711cdc2e0", + "position": { + "quantity": "160.000000000000000000", + "entry_price": "24.375243283322806983", + "margin": "3762.387088377671867635", + "cumulative_funding_entry": "0.741360126674168716" + } + }, + { + "subaccount_id": "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", + "market_id": "0xf97a740538e10845e0c3db9ea94c6eaf8a570aeebe3e3511e2e387501a40e4bb", + "position": { + "isLong": true, + "quantity": "110.000000000000000000", + "entry_price": "22.516556291390728477", + "margin": "2476.912251655629139073", + "cumulative_funding_entry": "0.000000000000000000" + } + } + ] } ``` @@ -2154,8 +2424,8 @@ Retrieves subaccount's position in market ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -2163,7 +2433,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2197,8 +2467,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2217,7 +2487,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2248,7 +2518,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2268,7 +2538,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2285,13 +2555,13 @@ func main() { ``` json { - "state":{ - "quantity":"3340193358036765108", - "entryPrice":"36571100000000000000000000", - "margin":"122195236794397342072018650", - "cumulativeFundingEntry":"-252598128590449182271444", - "isLong":false - } + "state": { + "isLong": true, + "quantity": "4001.268237974374735585", + "entry_price": "38.219387300439508994", + "margin": "149511.194761579584705663", + "cumulative_funding_entry": "1.164901749616683959" + } } ``` @@ -2321,8 +2591,8 @@ Retrieves subaccount's position in market ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -2330,7 +2600,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2364,8 +2634,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2384,7 +2654,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2415,7 +2685,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2435,7 +2705,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2452,12 +2722,12 @@ func main() { ``` json { - "state":{ - "quantity":"3340193358036765108", - "entryPrice":"36571100000000000000000000", - "effectiveMargin":"115186707927789961723454140", - "isLong":false - } + "state": { + "is_long": true, + "quantity": "4001.268237974374735585", + "entry_price": "38.219387300439508994", + "effective_margin": "52225.903642794329315064" + } } ``` @@ -2471,9 +2741,9 @@ func main() { - - -
ParameterTypeDescription
is_effective_position_longBooleanTrue if the position is long. False if the position is short
quantityDecimalThe position's amount
entry_priceDecimalThe order execution price when the position was created
effective_marginDecimalThe position's current margin amount
+quantityDecimalThe position's amount (in human redable format) +entry_priceDecimalThe order execution price when the position was created (in human redable format) +effective_marginDecimalThe position's current margin amount (in human redable format) @@ -2486,12 +2756,12 @@ Retrieves perpetual market's info ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2513,8 +2783,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2533,7 +2803,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2564,7 +2834,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2583,7 +2853,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2635,12 +2905,12 @@ Retrieves expiry market's info ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2662,8 +2932,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2682,7 +2952,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2713,7 +2983,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2732,7 +3002,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2762,8 +3032,8 @@ func main() { - -
ParameterTypeDescription
market_idStringThe market ID
expiration_timestampIntegerThe market's expiration time in seconds
twap_start_timestampIntegerDefines the start time of the TWAP calculation window
expiration_twap_start_price_cumulativeDecimalDefines the cumulative price for the start of the TWAP window
settlement_priceDecimalThe settlement price
+expiration_twap_start_price_cumulativeDecimalDefines the cumulative price for the start of the TWAP window (in human redable format) +settlement_priceDecimalThe settlement price (in human redable format) @@ -2776,12 +3046,12 @@ Retrieves perpetual market funding ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2803,8 +3073,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2823,7 +3093,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2854,7 +3124,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2873,7 +3143,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2907,7 +3177,7 @@ func main() { - +
ParameterTypeDescription
cumulative_fundingDecimalThe market's cumulative funding
cumulative_priceDecimalThe cumulative price for the current hour up to the last timestamp
cumulative_priceDecimalThe cumulative price for the current hour up to the last timestamp (in human redable format)
last_timestampIntegerLast funding timestamp in seconds
@@ -2921,8 +3191,8 @@ Retrieves a trader's derivative conditional orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -2930,7 +3200,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2964,8 +3234,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2983,7 +3253,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3014,7 +3284,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -3034,16 +3304,16 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` - - -
ParameterTypeDescriptionRequired
subaccount_idStringTrader subaccount IDNo
market_idStringThe market ID to query forNo
+ + +
ParameterTypeDescriptionRequired
subaccount_idstringthe subaccount IDYes
market_idstringthe market IDYes
### Response Parameters @@ -3057,23 +3327,23 @@ func main() { } ``` - -
ParameterTypeDescription
ordersTrimmedDerivativeConditionalOrder ArrayList of conditional orders
+ +
ParameterTypeDescription
ordersTrimmedDerivativeConditionalOrder array

**TrimmedDerivativeConditionalOrder** - - - - - - - - -
ParameterTypeDescription
priceDecimalThe order price
quantityDecimalThe order quantity
marginDecimalThe order margin
trigger_priceOracleTypePrice to trigger the order
is_buyBooleanTrue if the order is a buy order. False otherwise.
is_limitBooleanTrue if the order is a limit order. False otherwise.
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
+ + + + + + + + +
ParameterTypeDescription
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
margincosmossdk_io_math.LegacyDecmargin of the order (in human readable format)
triggerPricecosmossdk_io_math.LegacyDecprice to trigger the order (in human readable format)
isBuybooltrue if the order is a buy
isLimitbooltrue if the order is a limit order
order_hashstringthe order hash
cidstringthe client ID
@@ -3084,8 +3354,8 @@ func main() { ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -3094,7 +3364,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -3131,10 +3401,10 @@ async def main() -> None: await client.fetch_account(address.to_acc_bech32()) # prepare tx msg - message = composer.msg_instant_perpetual_market_launch( + message = composer.msg_instant_perpetual_market_launch_v2( sender=address.to_acc_bech32(), ticker="INJ/USDC PERP", - quote_denom="USDC", + quote_denom="factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc", oracle_base="INJ", oracle_quote="USDC", oracle_scale_factor=6, @@ -3143,6 +3413,7 @@ async def main() -> None: taker_fee_rate=Decimal("0.001"), initial_margin_ratio=Decimal("0.33"), maintenance_margin_ratio=Decimal("0.095"), + reduce_margin_ratio=Decimal("3"), min_price_tick_size=Decimal("0.001"), min_quantity_tick_size=Decimal("0.01"), min_notional=Decimal("1"), @@ -3164,20 +3435,22 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" @@ -3185,7 +3458,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3216,7 +3489,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3224,7 +3497,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3232,10 +3508,7 @@ func main() { minPriceTickSize := math.LegacyMustNewDecFromStr("0.01") minQuantityTickSize := math.LegacyMustNewDecFromStr("0.001") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - chainMinQuantityTickSize := minQuantityTickSize - - msg := &exchangetypes.MsgInstantPerpetualMarketLaunch{ + msg := &exchangev2types.MsgInstantPerpetualMarketLaunch{ Sender: senderAddress.String(), Ticker: "INJ/USDC PERP", QuoteDenom: "factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc", @@ -3247,21 +3520,21 @@ func main() { TakerFeeRate: math.LegacyMustNewDecFromStr("0.001"), InitialMarginRatio: math.LegacyMustNewDecFromStr("0.33"), MaintenanceMarginRatio: math.LegacyMustNewDecFromStr("0.095"), - MinPriceTickSize: chainMinPriceTickSize, - MinQuantityTickSize: chainMinQuantityTickSize, + ReduceMarginRatio: math.LegacyMustNewDecFromStr("0.3"), + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) - + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3269,28 +3542,29 @@ func main() { ``` - - - - - - - - - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe market launch requestor addressYes
tickerStringTicker for the perpetual marketYes
quote_denomStringQuote tocken denomYes
oracle_baseStringOracle base currencyYes
oracle_quoteStringOracle quote currencyYes
oracle_scale_factorIntegerScale factor for oracle pricesYes
oracle_typeOracleTypeThe oracle typeYes
maker_fee_rateDecimalDefines the trade fee rate for makers on the perpetual marketYes
taker_fee_rateDecimalDefines the trade fee rate for takers on the perpetual marketYes
initial_margin_ratioDecimalDefines the initial margin ratio for the perpetual marketYes
maintenance_margin_ratioDecimalDefines the maintenance margin ratio for the perpetual marketYes
min_price_tick_sizeDecimalDefines the minimum tick size of the order's priceYes
min_quantity_tick_sizeDecimalDefines the minimum tick size of the order's quantityYes
min_notionalDecimalDefines the minimum notional (in quote asset) required for orders in the marketYes
+ + + + + + + + + + + + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
tickerstringTicker for the derivative market.Yes
quote_denomstringtype of coin to use as the base currencyYes
oracle_basestringOracle base currencyYes
oracle_quotestringOracle quote currencyYes
oracle_scale_factoruint32Scale factor for oracle prices.Yes
oracle_typetypes1.OracleTypeOracle typeYes
maker_fee_ratecosmossdk_io_math.LegacyDecmaker_fee_rate defines the trade fee rate for makers on the perpetual marketYes
taker_fee_ratecosmossdk_io_math.LegacyDectaker_fee_rate defines the trade fee rate for takers on the perpetual marketYes
initial_margin_ratiocosmossdk_io_math.LegacyDecinitial_margin_ratio defines the initial margin ratio for the perpetual marketYes
maintenance_margin_ratiocosmossdk_io_math.LegacyDecmaintenance_margin_ratio defines the maintenance margin ratio for the perpetual marketYes
min_price_tick_sizecosmossdk_io_math.LegacyDecmin_price_tick_size defines the minimum tick size of the order's price and margin (in human readable format)Yes
min_quantity_tick_sizecosmossdk_io_math.LegacyDecmin_quantity_tick_size defines the minimum tick size of the order's quantity (in human readable format)Yes
min_notionalcosmossdk_io_math.LegacyDecmin_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)Yes
reduce_margin_ratiocosmossdk_io_math.LegacyDecreduce_margin_ratio defines the ratio of the margin that is reducedYes

**OracleType** - + @@ -3302,7 +3576,8 @@ func main() { -
CodeName
0Unspecified
1Band
2PriceFeed
8Uma
9Pyth
10BandIBC
11Provider
+11Provider +12Stork ### Response Parameters @@ -3312,75 +3587,38 @@ func main() { ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -3391,8 +3629,8 @@ func main() { ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -3401,7 +3639,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -3438,10 +3676,10 @@ async def main() -> None: await client.fetch_account(address.to_acc_bech32()) # prepare tx msg - message = composer.msg_instant_expiry_futures_market_launch( + message = composer.msg_instant_expiry_futures_market_launch_v2( sender=address.to_acc_bech32(), ticker="INJ/USDC FUT", - quote_denom="USDC", + quote_denom="factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc", oracle_base="INJ", oracle_quote="USDC", oracle_scale_factor=6, @@ -3472,20 +3710,22 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" @@ -3493,7 +3733,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3524,7 +3764,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3532,7 +3772,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3540,10 +3783,7 @@ func main() { minPriceTickSize := math.LegacyMustNewDecFromStr("0.01") minQuantityTickSize := math.LegacyMustNewDecFromStr("0.001") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - chainMinQuantityTickSize := minQuantityTickSize - - msg := &exchangetypes.MsgInstantExpiryFuturesMarketLaunch{ + msg := &exchangev2types.MsgInstantExpiryFuturesMarketLaunch{ Sender: senderAddress.String(), Ticker: "INJ/USDC FUT", QuoteDenom: "factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc", @@ -3556,21 +3796,22 @@ func main() { TakerFeeRate: math.LegacyMustNewDecFromStr("0.001"), InitialMarginRatio: math.LegacyMustNewDecFromStr("0.33"), MaintenanceMarginRatio: math.LegacyMustNewDecFromStr("0.095"), - MinPriceTickSize: chainMinPriceTickSize, - MinQuantityTickSize: chainMinQuantityTickSize, + ReduceMarginRatio: math.LegacyMustNewDecFromStr("0.3"), + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3578,29 +3819,30 @@ func main() { ``` - - - - - - - - - - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe market launch requestor addressYes
tickerStringTicker for the expiry futures marketYes
quote_denomStringQuote tocken denomYes
oracle_baseStringOracle base currencyYes
oracle_quoteStringOracle quote currencyYes
oracle_typeOracleTypeThe oracle typeYes
oracle_scale_factorIntegerScale factor for oracle pricesYes
expiryIntegerExpiration time of the marketYes
maker_fee_rateDecimalDefines the trade fee rate for makers on the perpetual marketYes
taker_fee_rateDecimalDefines the trade fee rate for takers on the perpetual marketYes
initial_margin_ratioDecimalDefines the initial margin ratio for the perpetual marketYes
maintenance_margin_ratioDecimalDefines the maintenance margin ratio for the perpetual marketYes
min_price_tick_sizeDecimalDefines the minimum tick size of the order's priceYes
min_quantity_tick_sizeDecimalDefines the minimum tick size of the order's quantityYes
min_notionalDecimalDefines the minimum notional (in quote asset) required for orders in the marketYes
+ + + + + + + + + + + + + + + + +
ParameterTypeDescriptionRequired
senderstringYes
tickerstringTicker for the derivative market.Yes
quote_denomstringtype of coin to use as the quote currencyYes
oracle_basestringOracle base currencyYes
oracle_quotestringOracle quote currencyYes
oracle_typetypes1.OracleTypeOracle typeYes
oracle_scale_factoruint32Scale factor for oracle prices.Yes
expiryint64Expiration time of the marketYes
maker_fee_ratecosmossdk_io_math.LegacyDecmaker_fee_rate defines the trade fee rate for makers on the expiry futures marketYes
taker_fee_ratecosmossdk_io_math.LegacyDectaker_fee_rate defines the trade fee rate for takers on the expiry futures marketYes
initial_margin_ratiocosmossdk_io_math.LegacyDecinitial_margin_ratio defines the initial margin ratio for the derivative marketYes
maintenance_margin_ratiocosmossdk_io_math.LegacyDecmaintenance_margin_ratio defines the maintenance margin ratio for the derivative marketYes
min_price_tick_sizecosmossdk_io_math.LegacyDecmin_price_tick_size defines the minimum tick size of the order's price and marginYes
min_quantity_tick_sizecosmossdk_io_math.LegacyDecmin_quantity_tick_size defines the minimum tick size of the order's quantityYes
min_notionalcosmossdk_io_math.LegacyDecmin_notional defines the minimum notional (in quote asset) required for orders in the marketYes
reduce_margin_ratiocosmossdk_io_math.LegacyDecreduce_margin_ratio defines the ratio of the margin that is reducedYes

**OracleType** - + @@ -3612,7 +3854,8 @@ func main() { -
CodeName
0Unspecified
1Band
2PriceFeed
8Uma
9Pyth
10BandIBC
11Provider
+11Provider +12Stork ### Response Parameters @@ -3622,106 +3865,68 @@ func main() { ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
-
-**StringEvent** +## MsgCreateDerivativeLimitOrder - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- +**IP rate limit group:** `chain` -
+### Request Parameters +> Request Example: -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
- - - -## MsgCreateDerivativeLimitOrder - -**IP rate limit group:** `chain` - -### Request Parameters -> Request Example: - - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -3729,13 +3934,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -3757,53 +3971,15 @@ async def main() -> None: cid=str(uuid.uuid4()), ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -3811,29 +3987,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3864,7 +4042,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3873,17 +4051,14 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) marketId := "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce" @@ -3891,10 +4066,10 @@ func main() { price := decimal.RequireFromString("31000") //31,000 leverage := decimal.RequireFromString("2.5") - order := chainClient.CreateDerivativeOrder( + order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: int32(exchangev2types.OrderType_BUY), //BUY SELL BUY_PO SELL_PO Quantity: amount, Price: price, Leverage: leverage, @@ -3903,47 +4078,24 @@ func main() { IsReduceOnly: true, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateDerivativeLimitOrder) - msg.Sender = senderAddress.String() - msg.Order = exchangetypes.DerivativeOrder(*order) - - simRes, err := chainClient.SimulateMsg(clientCtx, msg) - - if err != nil { - panic(err) - } - - msgCreateDerivativeLimitOrderResponse := exchangetypes.MsgCreateDerivativeLimitOrderResponse{} - err = msgCreateDerivativeLimitOrderResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) - - if err != nil { - panic(err) + msg := exchangev2types.MsgCreateDerivativeLimitOrder{ + Sender: senderAddress.String(), + Order: *order, } - fmt.Println("simulated order hash", msgCreateDerivativeLimitOrderResponse.OrderHash) - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3951,40 +4103,41 @@ func main() { ``` - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
orderDerivativeOrderOrder's parametersYes
+ + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
orderDerivativeOrderthe order detailsYes

**DerivativeOrder** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
marginDecimalThe margin amount used by the orderYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -4022,75 +4175,38 @@ DEBU[0003] gas wanted: 171439 fn=func1 src="client/ch gas fee: 0.0000857195 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -4101,27 +4217,26 @@ gas fee: 0.0000857195 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -4129,13 +4244,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -4157,53 +4281,15 @@ async def main() -> None: cid=str(uuid.uuid4()), ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -4211,29 +4297,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4265,7 +4353,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -4274,17 +4362,14 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) marketId := "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce" @@ -4292,10 +4377,10 @@ func main() { price := decimal.RequireFromString("33000") //33,000 leverage := decimal.RequireFromString("2.5") - order := chainClient.CreateDerivativeOrder( + order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_SELL, //BUY SELL + OrderType: int32(exchangev2types.OrderType_SELL), //BUY SELL Quantity: amount, Price: price, Leverage: leverage, @@ -4304,48 +4389,24 @@ func main() { IsReduceOnly: true, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateDerivativeMarketOrder) - msg.Sender = senderAddress.String() - msg.Order = exchangetypes.DerivativeOrder(*order) - - simRes, err := chainClient.SimulateMsg(clientCtx, msg) - - if err != nil { - panic(err) - } - - msgCreateDerivativeMarketOrderResponse := exchangetypes.MsgCreateDerivativeMarketOrderResponse{} - err = msgCreateDerivativeMarketOrderResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) - - if err != nil { - panic(err) + msg := exchangev2types.MsgCreateDerivativeMarketOrder{ + Sender: senderAddress.String(), + Order: *order, } - fmt.Println("simulated order hash", msgCreateDerivativeMarketOrderResponse.OrderHash) - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - return - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -4353,40 +4414,41 @@ func main() { ``` - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
orderDerivativeOrderOrder's parametersYes
+ + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
orderDerivativeOrderthe order detailsYes

**DerivativeOrder** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
marginDecimalThe margin amount used by the orderYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -4424,75 +4486,38 @@ DEBU[0003] gas wanted: 139962 fn=func1 src="client/ch gas fee: 0.000069981 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -4504,25 +4529,24 @@ gas fee: 0.000069981 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -4530,13 +4554,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -4545,51 +4578,24 @@ async def main() -> None: # prepare tx msg msg = composer.msg_cancel_derivative_order( - sender=address.to_acc_bech32(), market_id=market_id, subaccount_id=subaccount_id, order_hash=order_hash + sender=address.to_acc_bech32(), + market_id=market_id, + subaccount_id=subaccount_id, + order_hash=order_hash, + is_buy=True, + is_market_order=False, + is_conditional=False, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -4597,26 +4603,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4647,7 +4656,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -4656,12 +4665,15 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := &exchangetypes.MsgCancelDerivativeOrder{ + msg := exchangev2types.MsgCancelDerivativeOrder{ Sender: senderAddress.String(), MarketId: "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce", SubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", @@ -4669,24 +4681,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -4694,28 +4698,28 @@ func main() { ``` - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
market_idStringThe unique ID of the order's marketYes
subaccount_idStringThe subaccount ID the order belongs toYes
order_hashStringThe order hash (either order_hash or cid have to be provided)No
order_maskOrderMaskThe order mask that specifies the order typeNo
cidStringThe client order ID provided by the creator (either order_hash or cid have to be provided)No
+ + + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
market_idstringthe market IDYes
subaccount_idstringthe subaccount IDYes
order_hashstringthe order hash (optional)No
order_maskint32the order mask (bitwise combination of OrderMask enum values) (optional)No
cidstringthe client order ID (optional)No

**OrderMask** - - - - - - - - -
CodeName
0OrderMask_UNUSED
1OrderMask_ANY
2OrderMask_REGULAR
4OrderMask_CONDITIONAL
8OrderMask_BUY_OR_HIGHER
16OrderMask_SELL_OR_LOWER
32OrderMask_MARKET
64OrderMask_LIMIT
+ + + + + + + + +
CodeName
0UNUSED
1ANY
2REGULAR
4CONDITIONAL
8DIRECTION_BUY_OR_HIGHER
16DIRECTION_SELL_OR_LOWER
32TYPE_MARKET
64TYPE_LIMIT
### Response Parameters @@ -4742,75 +4746,38 @@ DEBU[0003] gas wanted: 141373 fn=func1 src="client/ch gas fee: 0.0000706865 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -4828,27 +4795,26 @@ Further note that if no marketIDs are provided in the SpotMarketIdsToCancelAll o ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -4856,13 +4822,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -4877,12 +4852,12 @@ async def main() -> None: spot_market_id_cancel_2 = "0x7a57e705bb4e09c88aecfc295569481dbf2fe1d5efe364651fbe72385938e9b0" derivative_orders_to_cancel = [ - composer.order_data( + composer.create_order_data_without_mask( market_id=derivative_market_id_cancel, subaccount_id=subaccount_id, order_hash="0x48690013c382d5dbaff9989db04629a16a5818d7524e027d517ccc89fd068103", ), - composer.order_data( + composer.create_order_data_without_mask( market_id=derivative_market_id_cancel_2, subaccount_id=subaccount_id, order_hash="0x7ee76255d7ca763c56b0eab9828fca89fdd3739645501c8a80f58b62b4f76da5", @@ -4890,12 +4865,12 @@ async def main() -> None: ] spot_orders_to_cancel = [ - composer.order_data( + composer.create_order_data_without_mask( market_id=spot_market_id_cancel, subaccount_id=subaccount_id, cid="0e5c3ad5-2cc4-4a2a-bbe5-b12697739163", ), - composer.order_data( + composer.create_order_data_without_mask( market_id=spot_market_id_cancel_2, subaccount_id=subaccount_id, order_hash="0x222daa22f60fe9f075ed0ca583459e121c23e64431c3fbffdedda04598ede0d2", @@ -4959,53 +4934,15 @@ async def main() -> None: spot_orders_to_cancel=spot_orders_to_cancel, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -5013,29 +4950,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -5067,7 +5006,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -5077,17 +5016,14 @@ func main() { return } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) smarketId := "0x0511ddc4e6586f3bfe1acb2dd905f8b8a82c97e1edaef654b12ca7e6031ca0fa" @@ -5095,17 +5031,16 @@ func main() { sprice := decimal.NewFromFloat(22.5) smarketIds := []string{"0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0"} - spot_order := chainClient.CreateSpotOrder( + spot_order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: int32(exchangev2types.OrderType_BUY), //BUY SELL BUY_PO SELL_PO Quantity: samount, Price: sprice, FeeRecipient: senderAddress.String(), MarketId: smarketId, Cid: uuid.NewString(), }, - marketsAssistant, ) dmarketId := "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce" @@ -5114,63 +5049,40 @@ func main() { dleverage := decimal.RequireFromString("2") dmarketIds := []string{"0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce"} - derivative_order := chainClient.CreateDerivativeOrder( + derivative_order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: int32(exchangev2types.OrderType_BUY), //BUY SELL BUY_PO SELL_PO Quantity: damount, Price: dprice, Leverage: dleverage, FeeRecipient: senderAddress.String(), MarketId: dmarketId, IsReduceOnly: false, - Cid: uuid.NewString(), - }, - marketsAssistant, - ) - - msg := new(exchangetypes.MsgBatchUpdateOrders) - msg.Sender = senderAddress.String() - msg.SubaccountId = defaultSubaccountID.Hex() - msg.SpotOrdersToCreate = []*exchangetypes.SpotOrder{spot_order} - msg.DerivativeOrdersToCreate = []*exchangetypes.DerivativeOrder{derivative_order} - msg.SpotMarketIdsToCancelAll = smarketIds - msg.DerivativeMarketIdsToCancelAll = dmarketIds - - simRes, err := chainClient.SimulateMsg(clientCtx, msg) - - if err != nil { - fmt.Println(err) - return - } - - MsgBatchUpdateOrdersResponse := exchangetypes.MsgBatchUpdateOrdersResponse{} - MsgBatchUpdateOrdersResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) - - fmt.Println("simulated spot order hashes", MsgBatchUpdateOrdersResponse.SpotOrderHashes) - - fmt.Println("simulated derivative order hashes", MsgBatchUpdateOrdersResponse.DerivativeOrderHashes) - - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + Cid: uuid.NewString(), + }, + ) - if err != nil { - fmt.Println(err) - return + msg := exchangev2types.MsgBatchUpdateOrders{ + Sender: senderAddress.String(), + SubaccountId: defaultSubaccountID.Hex(), + SpotOrdersToCreate: []*exchangev2types.SpotOrder{spot_order}, + DerivativeOrdersToCreate: []*exchangev2types.DerivativeOrder{derivative_order}, + SpotMarketIdsToCancelAll: smarketIds, + DerivativeMarketIdsToCancelAll: dmarketIds, } - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -5178,87 +5090,89 @@ func main() { ``` - - - - - - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
subaccount_idStringThe subaccount ID is only used for the spot_market_ids_to_cancel_all and derivative_market_ids_to_cancel_allNo
spot_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
derivative_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
spot_orders_to_cancelOrderData ArrayList of spot orders to be cancelledNo
derivative_orders_to_cancelOrderData ArrayList of derivative orders to be cancelledNo
spot_orders_to_createSpotOrder ArrayList of spot orders to be createdNo
derivative_orders_to_createDerivativeOrder ArrayList of derivative orders to be createdNo
binary_options_orders_to_cancelOrderData ArrayList of binary options orders to be cancelledNo
binary_options_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
binary_options_orders_to_createDerivativeOrder ArrayList of binary options orders to be createdNo
+ + + + + + + + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
subaccount_idstringsubaccount_id only used for the spot_market_ids_to_cancel_all and derivative_market_ids_to_cancel_all (optional)No
spot_market_ids_to_cancel_allstring arraythe market IDs to cancel all spot orders for (optional)No
derivative_market_ids_to_cancel_allstring arraythe market IDs to cancel all derivative orders for (optional)No
spot_orders_to_cancelOrderData arraythe spot orders to cancelNo
derivative_orders_to_cancelOrderData arraythe derivative orders to cancelNo
spot_orders_to_createSpotOrder arraythe spot orders to createNo
derivative_orders_to_createDerivativeOrder arraythe derivative orders to createNo
binary_options_orders_to_cancelOrderData arraythe binary options orders to cancelNo
binary_options_market_ids_to_cancel_allstring arraythe market IDs to cancel all binary options orders for (optional)No
binary_options_orders_to_createDerivativeOrder arraythe binary options orders to createNo

**OrderData** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe order's market IDYes
subaccount_idStringSubaccount ID that created the orderYes
order_hashStringThe order hash (either the order_hash or the cid should be provided)No
order_maskOrderMaskThe order mask that specifies the order typeNo
cidStringThe order's client order ID (either the order_hash or the cid should be provided)No
+ + + + + +
ParameterTypeDescription
market_idstringthe market ID
subaccount_idstringthe subaccount ID
order_hashstringthe order hash (optional - either the order_hash or the cid should be provided)
order_maskint32the order mask (bitwise combination of OrderMask enum values)
cidstringthe client order ID (optional - either the order_hash or the cid should be provided)

**SpotOrder** - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**DerivativeOrder** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
marginDecimalThe margin amount used by the orderYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderMask** - - - - - - - - -
CodeName
0OrderMask_UNUSED
1OrderMask_ANY
2OrderMask_REGULAR
4OrderMask_CONDITIONAL
8OrderMask_BUY_OR_HIGHER
16OrderMask_SELL_OR_LOWER
32OrderMask_MARKET
64OrderMask_LIMIT
+ + + + + + + + +
CodeName
0UNUSED
1ANY
2REGULAR
4CONDITIONAL
8DIRECTION_BUY_OR_HIGHER
16DIRECTION_SELL_OR_LOWER
32TYPE_MARKET
64TYPE_LIMIT

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -5304,75 +5218,38 @@ DEBU[0003] gas wanted: 659092 fn=func1 src="client/ch gas fee: 0.000329546 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -5388,27 +5265,26 @@ To detect the liquidable positions please use the Indexer endpoint called [Liqui ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -5416,13 +5292,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -5451,54 +5336,15 @@ async def main() -> None: order=order, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) - print(f"\n\ncid: {cid}") + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -5506,8 +5352,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -5516,19 +5362,20 @@ import ( "encoding/json" "fmt" "os" + "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -5559,7 +5406,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -5568,17 +5415,14 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" @@ -5586,10 +5430,10 @@ func main() { price := decimal.RequireFromString("39.01") leverage := decimal.RequireFromString("1") - order := chainClient.CreateDerivativeOrder( + order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_SELL, + OrderType: int32(exchangev2types.OrderType_SELL), Quantity: amount, Price: price, Leverage: leverage, @@ -5597,10 +5441,9 @@ func main() { MarketId: marketId, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := &exchangetypes.MsgLiquidatePosition{ + msg := &exchangev2types.MsgLiquidatePosition{ Sender: senderAddress.String(), SubaccountId: "0x156df4d5bc8e7dd9191433e54bd6a11eeb390921000000000000000000000000", MarketId: marketId, @@ -5608,16 +5451,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -5625,42 +5468,43 @@ func main() { ``` - - - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
subaccount_idStringThe subaccount ID to create the orderYes
market_idStringThe order's unique market IDYes
orderDerivativeOrderOrder's parametersYes
+ + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
subaccount_idstringthe subaccount ID the position belongs toYes
market_idstringthe position's market IDYes
orderDerivativeOrderoptional order to provide for liquidationNo

**DerivativeOrder** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
marginDecimalThe margin amount used by the orderYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -5683,75 +5527,38 @@ func main() { ```go ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -5763,26 +5570,25 @@ func main() { ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -5790,13 +5596,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -5811,48 +5626,15 @@ async def main() -> None: amount=Decimal(2), ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -5860,27 +5642,30 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -5911,7 +5696,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -5920,12 +5705,15 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := &exchangetypes.MsgIncreasePositionMargin{ + msg := exchangev2types.MsgIncreasePositionMargin{ Sender: senderAddress.String(), MarketId: "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce", SourceSubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", @@ -5934,24 +5722,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -5959,12 +5739,12 @@ func main() { ``` - - - - - -
ParameterTypeDescriptionRequired
senderStringThe sender's addressYes
source_subaccount_idStringSubaccount ID from where the funds are deductedYes
destination_subaccount_idStringSubaccount ID the funds are deposited intoYes
market_idStringThe position's unique market IDYes
amountDecimalThe amount of margin to add to the positionYes
+ + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
source_subaccount_idstringthe subaccount ID sending the fundsYes
destination_subaccount_idstringthe subaccount ID the position belongs toYes
market_idstringthe market IDYes
amountcosmossdk_io_math.LegacyDecamount defines the amount of margin to add to the position (in human readable format)Yes
### Response Parameters @@ -5987,75 +5767,38 @@ DEBU[0002] gas wanted: 133614 fn=func1 src="client/ch gas fee: 0.000066807 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -6069,8 +5812,8 @@ Message to reduce the margin assigned to a particular position ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -6079,7 +5822,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -6143,27 +5886,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -6194,7 +5939,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -6203,14 +5948,17 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) - msg := &exchangetypes.MsgDecreasePositionMargin{ + msg := &exchangev2types.MsgDecreasePositionMargin{ Sender: senderAddress.String(), MarketId: "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", SourceSubaccountId: defaultSubaccountID.String(), @@ -6219,16 +5967,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -6236,12 +5984,12 @@ func main() { ``` - - - - - -
ParameterTypeDescriptionRequired
senderStringThe sender's addressYes
source_subaccount_idStringSubaccount ID the position belongs toYes
destination_subaccount_idStringSubaccount ID the funds are deposited intoYes
market_idStringThe position's unique market IDYes
amountDecimalThe amount of margin to remove from the positionYes
+ + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
source_subaccount_idstringthe subaccount ID the position belongs toYes
destination_subaccount_idstringthe destination subaccount IDYes
market_idstringthe market IDYes
amountcosmossdk_io_math.LegacyDecamount defines the amount of margin to withdraw from the position (in human readable format)Yes
### Response Parameters @@ -6264,75 +6012,38 @@ DEBU[0002] gas wanted: 133614 fn=func1 src="client/ch gas fee: 0.000066807 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -6346,8 +6057,8 @@ Modifies certain market fields. It can only be sent by the market's admin. ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -6356,7 +6067,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -6402,6 +6113,7 @@ async def main() -> None: new_min_notional=Decimal("2"), new_initial_margin_ratio=Decimal("0.40"), new_maintenance_margin_ratio=Decimal("0.085"), + new_reduce_margin_ratio=Decimal("3.5"), ) # broadcast the transaction @@ -6420,27 +6132,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -6471,7 +6185,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -6479,7 +6193,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -6488,32 +6205,29 @@ func main() { minQuantityTickSize := math.LegacyMustNewDecFromStr("0.1") minNotional := math.LegacyMustNewDecFromStr("2") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - chainMinQuantityTickSize := minQuantityTickSize - chainMinNotional := minNotional.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - - msg := &exchangetypes.MsgUpdateDerivativeMarket{ + msg := &exchangev2types.MsgUpdateDerivativeMarket{ Admin: senderAddress.String(), MarketId: "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", NewTicker: "INJ/USDT PERP 2", - NewMinPriceTickSize: chainMinPriceTickSize, - NewMinQuantityTickSize: chainMinQuantityTickSize, - NewMinNotional: chainMinNotional, + NewMinPriceTickSize: minPriceTickSize, + NewMinQuantityTickSize: minQuantityTickSize, + NewMinNotional: minNotional, NewInitialMarginRatio: math.LegacyMustNewDecFromStr("0.4"), NewMaintenanceMarginRatio: math.LegacyMustNewDecFromStr("0.085"), + NewReduceMarginRatio: math.LegacyMustNewDecFromStr("0.3"), } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -6521,15 +6235,16 @@ func main() { ``` - - - - - - - - -
ParameterTypeDescriptionRequired
adminStringThe market's admin address (has to be the message broadcaster)Yes
market_idStringThe market's unique IDYes
new_tickerStringNew ticker for the perpetual marketNo
new_min_price_tick_sizeDecimalDefines the minimum tick size of the order's priceNo
new_min_quantity_tick_sizeDecimalDefines the minimum tick size of the order's quantityNo
new_min_notionalDecimalDefines the minimum notional (in quote asset) required for orders in the marketNo
new_initial_margin_ratioDecimalDefines the initial margin ratio for the perpetual marketNo
new_maintenance_margin_ratioDecimalDefines the maintenance margin ratio for the perpetual marketNo
+ + + + + + + + + +
ParameterTypeDescriptionRequired
adminstringcurrent admin address of the associated marketYes
market_idstringid of the market to be updatedYes
new_tickerstring(optional) updated value for tickerNo
new_min_price_tick_sizecosmossdk_io_math.LegacyDec(optional) updated value for min_price_tick_size (in human readable format)No
new_min_quantity_tick_sizecosmossdk_io_math.LegacyDec(optional) updated value min_quantity_tick_size (in human readable format)No
new_min_notionalcosmossdk_io_math.LegacyDec(optional) updated min notional (in human readable format)No
new_initial_margin_ratiocosmossdk_io_math.LegacyDec(optional) updated value for initial_margin_ratioNo
new_maintenance_margin_ratiocosmossdk_io_math.LegacyDec(optional) updated value for maintenance_margin_ratioNo
new_reduce_margin_ratiocosmossdk_io_math.LegacyDec(optional) updated value for reduce_margin_ratioNo
### Response Parameters @@ -6552,75 +6267,38 @@ DEBU[0002] gas wanted: 133614 fn=func1 src="client/ch gas fee: 0.000066807 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -6633,17 +6311,18 @@ This function computes order hashes locally for SpotOrder and DerivativeOrder. F ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT from pyinjective.core.network import Network from pyinjective.orderhash import OrderHashManager @@ -6770,7 +6449,7 @@ async def main() -> None: # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) + print(json.dumps(res, indent=2)) print("gas wanted: {}".format(gas_limit)) print("gas fee: {} INJ".format(gas_fee)) @@ -6811,7 +6490,7 @@ async def main() -> None: # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) + print(json.dumps(res, indent=2)) print("gas wanted: {}".format(gas_limit)) print("gas fee: {} INJ".format(gas_fee)) @@ -6907,7 +6586,7 @@ async def main() -> None: # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) + print(json.dumps(res, indent=2)) print("gas wanted: {}".format(gas_limit)) print("gas fee: {} INJ".format(gas_fee)) @@ -6917,29 +6596,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -6970,7 +6651,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -6979,37 +6660,33 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - // prepare tx msg defaultSubaccountID := chainClient.Subaccount(senderAddress, 1) - spotOrder := chainClient.CreateSpotOrder( + spotOrder := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, + OrderType: int32(exchangev2types.OrderType_BUY), Quantity: decimal.NewFromFloat(2), Price: decimal.NewFromFloat(22.55), FeeRecipient: senderAddress.String(), MarketId: "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", Cid: uuid.NewString(), }, - marketsAssistant, ) - derivativeOrder := chainClient.CreateDerivativeOrder( + derivativeOrder := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, + OrderType: int32(exchangev2types.OrderType_BUY), Quantity: decimal.NewFromFloat(2), Price: decimal.RequireFromString("31"), Leverage: decimal.RequireFromString("2.5"), @@ -7017,16 +6694,17 @@ func main() { MarketId: "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgBatchCreateSpotLimitOrders) - msg.Sender = senderAddress.String() - msg.Orders = []exchangetypes.SpotOrder{*spotOrder} + msg := exchangev2types.MsgBatchCreateSpotLimitOrders{ + Sender: senderAddress.String(), + Orders: []exchangev2types.SpotOrder{*spotOrder}, + } - msg1 := new(exchangetypes.MsgBatchCreateDerivativeLimitOrders) - msg1.Sender = senderAddress.String() - msg1.Orders = []exchangetypes.DerivativeOrder{*derivativeOrder, *derivativeOrder} + msg1 := exchangev2types.MsgBatchCreateDerivativeLimitOrders{ + Sender: senderAddress.String(), + Orders: []exchangev2types.DerivativeOrder{*derivativeOrder}, + } // compute local order hashes orderHashes, err := chainClient.ComputeOrderHashes(msg.Orders, msg1.Orders, defaultSubaccountID) @@ -7039,24 +6717,16 @@ func main() { fmt.Println("computed derivative order hashes: ", orderHashes.Derivative) // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg, msg1) - - if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg, &msg1) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) diff --git a/source/includes/_derivativesrpc.md b/source/includes/_derivativesrpc.md index ca6284c4..1827009b 100644 --- a/source/includes/_derivativesrpc.md +++ b/source/includes/_derivativesrpc.md @@ -11,22 +11,23 @@ Get details of a single derivative market. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" market = await client.fetch_derivative_market(market_id=market_id) - print(market) + print(json.dumps(market, indent=2)) if __name__ == "__main__": @@ -34,8 +35,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -63,7 +64,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -242,23 +243,24 @@ Get a list of one or more derivative markets. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_statuses = ["active"] quote_denom = "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5" market = await client.fetch_derivative_markets(market_statuses=market_statuses, quote_denom=quote_denom) - print(market) + print(json.dumps(market, indent=2)) if __name__ == "__main__": @@ -266,8 +268,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -303,7 +305,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -554,16 +556,16 @@ Stream live updates of derivative markets. ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def market_event_processor(event: Dict[str, Any]): @@ -581,7 +583,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) task = asyncio.get_event_loop().create_task( client.listen_derivative_market_updates( @@ -600,8 +602,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -639,7 +641,7 @@ func main() { panic(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -827,20 +829,21 @@ Lists historical orders posted from a subaccount ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = ["0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"] subaccount_id = "0x295639d56c987f0e24d21bb167872b3542a6e05a000000000000000000000000" is_conditional = "false" @@ -853,7 +856,7 @@ async def main() -> None: is_conditional=is_conditional, pagination=pagination, ) - print(orders) + print(json.dumps(orders, indent=2)) if __name__ == "__main__": @@ -861,8 +864,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -903,7 +906,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1168,16 +1171,16 @@ Stream order updates of a derivative market. ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def order_event_processor(event: Dict[str, Any]): @@ -1195,7 +1198,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" task = asyncio.get_event_loop().create_task( @@ -1216,8 +1219,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1263,7 +1266,7 @@ func main() { panic(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -1426,20 +1429,21 @@ The difference between `Trades` and `TradesV2` is that the latter returns a `tra ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = ["0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"] subaccount_ids = ["0xc6fe5d33615a1c52c08018c47e8bc53646a0e101000000000000000000000000"] skip = 0 @@ -1448,7 +1452,7 @@ async def main() -> None: trades = await client.fetch_derivative_trades( market_ids=market_ids, subaccount_ids=subaccount_ids, pagination=pagination ) - print(trades) + print(json.dumps(trades, indent=2)) if __name__ == "__main__": @@ -1456,8 +1460,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1492,7 +1496,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1842,16 +1846,16 @@ The difference between `StreamTrades` and `StreamTradesV2` is that the latter re ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def market_event_processor(event: Dict[str, Any]): @@ -1869,7 +1873,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = [ "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", "0x70bc8d7feab38b23d5fdfb12b9c3726e400c265edbcbf449b6c80c31d63d3a02", @@ -1895,8 +1899,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1940,7 +1944,7 @@ func main() { panic(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -2155,20 +2159,21 @@ Get the positions of a market. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = [ "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", "0xd97d0da6f6c11710ef06315971250e4e9aed4b7d4cd02059c9477ec8cf243782", @@ -2186,7 +2191,7 @@ async def main() -> None: subaccount_total_positions=subaccount_total_positions, pagination=pagination, ) - print(positions) + print(json.dumps(positions, indent=2)) if __name__ == "__main__": @@ -2194,8 +2199,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2235,7 +2240,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2471,16 +2476,16 @@ Stream position updates for a specific market. ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def positions_event_processor(event: Dict[str, Any]): @@ -2498,7 +2503,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) market_ids = ["0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"] subaccount_ids = ["0xea98e3aa091a6676194df40ac089e40ab4604bf9000000000000000000000000"] @@ -2521,8 +2526,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2566,7 +2571,7 @@ func main() { panic(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -2698,19 +2703,20 @@ Gets all the liquidable positions ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" skip = 10 limit = 3 @@ -2719,7 +2725,7 @@ async def main() -> None: market_id=market_id, pagination=pagination, ) - print(positions) + print(json.dumps(positions, indent=2)) if __name__ == "__main__": @@ -2727,8 +2733,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2765,7 +2771,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -3010,25 +3016,27 @@ Get an orderbook snapshot for one or more derivative markets. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) market_ids = [ "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", "0xd5e4b12b19ecf176e4e14b42944731c27677819d2ed93be4104ad7025529c7ff", ] - orderbooks = await client.fetch_derivative_orderbooks_v2(market_ids=market_ids) - print(orderbooks) + depth = 1 + orderbooks = await client.fetch_derivative_orderbooks_v2(market_ids=market_ids, depth=depth) + print(json.dumps(orderbooks, indent=2)) if __name__ == "__main__": @@ -3036,8 +3044,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3060,12 +3068,13 @@ func main() { ctx := context.Background() marketIds := []string{"0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce"} - res, err := exchangeClient.GetDerivativeOrderbooksV2(ctx, marketIds) + depth := int32(10) + res, err := exchangeClient.GetDerivativeOrderbooksV2(ctx, marketIds, depth) if err != nil { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -3256,16 +3265,16 @@ Stream orderbook snapshot updates for one or more derivative markets ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def orderbook_event_processor(event: Dict[str, Any]): @@ -3283,7 +3292,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = ["0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"] task = asyncio.get_event_loop().create_task( @@ -3304,8 +3313,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3422,8 +3431,8 @@ Stream incremental orderbook updates for one or more derivative markets. This st ### Request Parameters > Request Example: - - + + ```py import asyncio from decimal import Decimal @@ -3431,8 +3440,8 @@ from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient def stream_error_processor(exception: RpcError): @@ -3460,9 +3469,9 @@ class Orderbook: self.levels = {"buys": {}, "sells": {}} -async def load_orderbook_snapshot(async_client: AsyncClient, orderbook: Orderbook): +async def load_orderbook_snapshot(client: IndexerClient, orderbook: Orderbook): # load the snapshot - res = await async_client.fetch_derivative_orderbooks_v2(market_ids=[orderbook.market_id]) + res = await client.fetch_derivative_orderbooks_v2(market_ids=[orderbook.market_id], depth=1) for snapshot in res["orderbooks"]: if snapshot["marketId"] != orderbook.market_id: raise Exception("unexpected snapshot") @@ -3481,13 +3490,12 @@ async def load_orderbook_snapshot(async_client: AsyncClient, orderbook: Orderboo quantity=Decimal(sell["quantity"]), timestamp=int(sell["timestamp"]), ) - break async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - async_client = AsyncClient(network) + indexer_client = IndexerClient(network) market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" orderbook = Orderbook(market_id=market_id) @@ -3499,7 +3507,7 @@ async def main() -> None: # start getting price levels updates task = asyncio.get_event_loop().create_task( - async_client.listen_derivative_orderbook_updates( + indexer_client.listen_derivative_orderbook_updates( market_ids=[market_id], callback=queue_event, on_end_callback=stream_closed_processor, @@ -3509,7 +3517,7 @@ async def main() -> None: tasks.append(task) # load the snapshot once we are already receiving updates, so we don't miss any - await load_orderbook_snapshot(async_client=async_client, orderbook=orderbook) + await load_orderbook_snapshot(client=indexer_client, orderbook=orderbook) task = asyncio.get_event_loop().create_task( apply_orderbook_update(orderbook=orderbook, updates_queue=updates_queue) @@ -3583,8 +3591,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3654,7 +3662,8 @@ func main() { // prepare orderbooks map orderbooks := map[string]*MapOrderbook{} - res, err := exchangeClient.GetDerivativeOrderbooksV2(ctx, marketIds) + depth := int32(0) + res, err := exchangeClient.GetDerivativeOrderbooksV2(ctx, marketIds, depth) if err != nil { panic(err) } @@ -3742,7 +3751,7 @@ func main() { } } - res, _ = exchangeClient.GetDerivativeOrderbooksV2(ctx, marketIds) + res, _ = exchangeClient.GetDerivativeOrderbooksV2(ctx, marketIds, depth) fmt.Println("query", res.Orderbooks[0].Orderbook.Sequence, len(res.Orderbooks[0].Orderbook.Sells), len(res.Orderbooks[0].Orderbook.Buys)) // print orderbook @@ -3863,20 +3872,21 @@ Get the derivative orders of a specific subaccount. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount_id = "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000" market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" skip = 1 @@ -3885,7 +3895,7 @@ async def main() -> None: orders = await client.fetch_derivative_subaccount_orders_list( subaccount_id=subaccount_id, market_id=market_id, pagination=pagination ) - print(orders) + print(json.dumps(orders, indent=2)) if __name__ == "__main__": @@ -3893,8 +3903,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3934,7 +3944,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -4079,20 +4089,21 @@ Get the derivative trades for a specific subaccount. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount_id = "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000" market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" execution_type = "market" @@ -4107,7 +4118,7 @@ async def main() -> None: direction=direction, pagination=pagination, ) - print(trades) + print(json.dumps(trades, indent=2)) if __name__ == "__main__": @@ -4115,8 +4126,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4156,7 +4167,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -4303,20 +4314,21 @@ Get the funding payments for a subaccount. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = ["0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"] subaccount_id = "0xc6fe5d33615a1c52c08018c47e8bc53646a0e101000000000000000000000000" skip = 0 @@ -4326,7 +4338,7 @@ async def main() -> None: funding_payments = await client.fetch_funding_payments( market_ids=market_ids, subaccount_id=subaccount_id, pagination=pagination ) - print(funding_payments) + print(json.dumps(funding_payments, indent=2)) if __name__ == "__main__": @@ -4334,8 +4346,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4371,7 +4383,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -4478,27 +4490,28 @@ Get the historical funding rates for a specific market. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" skip = 0 limit = 3 end_time = 1675717201465 pagination = PaginationOption(skip=skip, limit=limit, end_time=end_time) funding_rates = await client.fetch_funding_rates(market_id=market_id, pagination=pagination) - print(funding_rates) + print(json.dumps(funding_rates, indent=2)) if __name__ == "__main__": @@ -4506,8 +4519,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4541,7 +4554,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -4635,21 +4648,22 @@ Get details of a single binary options market. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_id = "0x175513943b8677368d138e57bcd6bef53170a0da192e7eaa8c2cd4509b54f8db" market = await client.fetch_binary_options_market(market_id=market_id) - print(market) + print(json.dumps(market, indent=2)) if __name__ == "__main__": @@ -4750,23 +4764,24 @@ Get a list of binary options markets. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_status = "active" quote_denom = "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7" market = await client.fetch_binary_options_markets(market_status=market_status, quote_denom=quote_denom) - print(market) + print(json.dumps(market, indent=2)) if __name__ == "__main__": diff --git a/source/includes/_erc20.md b/source/includes/_erc20.md new file mode 100644 index 00000000..ac46424f --- /dev/null +++ b/source/includes/_erc20.md @@ -0,0 +1,920 @@ +# - ERC20 + +Includes all the messages and queries related to the tokens for the native EVM implementation. + + +## AllTokenPairs + +Defines a gRPC query method that returns the erc20 module's created token pairs + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.client.model.pagination import PaginationOption +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + pairs = await client.fetch_erc20_all_token_pairs( + pagination=PaginationOption( + skip=0, + limit=100, + ), + ) + print(json.dumps(pairs, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/cosmos/cosmos-sdk/types/query" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + pagination := query.PageRequest{Limit: 10} + + res, err := chainClient.FetchAllTokenPairs(ctx, &pagination) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + +No parameters + +### Response Parameters +> Response Example: + +``` json + +``` + + + +
ParameterTypeDescription
token_pairsTokenPair array
paginationquery.PageResponsepagination defines the pagination in the response.
+ + +
+ +**TokenPair** + + + +
ParameterTypeDescription
bank_denomstring
erc20_addressstring
+ + + +## TokenPairByDenom + +Defines a gRPC query method that returns the erc20 module's token pair associated with the provided bank denom + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + result = await client.fetch_erc20_token_pair_by_denom(bank_denom="usdt") + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + res, err := chainClient.FetchTokenPairByERC20Address(ctx, "usdt") + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + +
ParameterTypeDescriptionRequired
bank_denomstringYes
+ + +### Response Parameters +> Response Example: + +``` json + +``` + + +
ParameterTypeDescription
token_pairTokenPair
+ + +
+ +**TokenPair** + + + +
ParameterTypeDescription
bank_denomstring
erc20_addressstring
+ + + +## TokenPairByERC20Address + +Defines a gRPC query method that returns the erc20 module's token pair associated with the provided erc20 contract address + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + erc20_address = "0xdAC17F958D2ee523a2206206994597C13D831ec7" + result = await client.fetch_erc20_token_pair_by_erc20_address(erc20_address=erc20_address) + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + usdtERC20 := "0xdAC17F958D2ee523a2206206994597C13D831ec7" + res, err := chainClient.FetchTokenPairByDenom(ctx, usdtERC20) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + +
ParameterTypeDescriptionRequired
erc20_addressstringYes
+ + +### Response Parameters +> Response Example: + +``` json + +``` + + +
ParameterTypeDescription
token_pairTokenPair
+ + +
+ +**TokenPair** + + + +
ParameterTypeDescription
bank_denomstring
erc20_addressstring
+ + + +## MsgCreateTokenPair + +Creates a new ERC20 token + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk +from pyinjective.core.network import Network +from pyinjective.wallet import PrivateKey + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + composer = await client.composer() + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=configured_private_key, + gas_price=gas_price, + client=client, + composer=composer, + ) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + usdt_denom = "factory/inj10vkkttgxdeqcgeppu20x9qtyvuaxxev8qh0awq/usdt" + usdt_erc20 = "0xdAC17F958D2ee523a2206206994597C13D831ec7" + + # prepare tx msg + msg = composer.msg_create_token_pair( + sender=address.to_acc_bech32(), + bank_denom=usdt_denom, + erc20_address=usdt_erc20, + ) + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + message_broadcaster.update_gas_price(gas_price=gas_price) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + + erc20types "github.com/InjectiveLabs/sdk-go/chain/erc20/types" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + if err != nil { + panic(err) + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + ) + + if err != nil { + panic(err) + } + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) + + usdtDenom := "factory/inj10vkkttgxdeqcgeppu20x9qtyvuaxxev8qh0awq/usdt" + usdtERC20 := "0xdAC17F958D2ee523a2206206994597C13D831ec7" + + msg := erc20types.MsgCreateTokenPair{ + Sender: senderAddress.String(), + TokenPair: erc20types.TokenPair{ + BankDenom: usdtDenom, + Erc20Address: usdtERC20, + }, + } + + // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) + + gasPrice = chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) +} +``` + + + + +
ParameterTypeDescriptionRequired
senderstringYes
token_pairTokenPairYes
+ + +
+ +**TokenPair** + + + +
ParameterTypeDescription
bank_denomstring
erc20_addressstring
+ + +### Response Parameters +> Response Example: + +``` json +``` + + +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.
+ + +
+ +**TxResponse** + + + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
+ + +
+ +**ABCIMessageLog** + + + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
+ + + +## MsgDeleteTokenPair + +Deletes an ERC20 token + +**IP rate limit group:** `chain` + + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk +from pyinjective.core.network import Network +from pyinjective.wallet import PrivateKey + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + composer = await client.composer() + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=configured_private_key, + gas_price=gas_price, + client=client, + composer=composer, + ) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + usdt_denom = "factory/inj10vkkttgxdeqcgeppu20x9qtyvuaxxev8qh0awq/usdt" + + # prepare tx msg + msg = composer.msg_delete_token_pair( + sender=address.to_acc_bech32(), + bank_denom=usdt_denom, + ) + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + message_broadcaster.update_gas_price(gas_price=gas_price) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + + erc20types "github.com/InjectiveLabs/sdk-go/chain/erc20/types" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + if err != nil { + panic(err) + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + ) + + if err != nil { + panic(err) + } + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) + + usdtDenom := "factory/inj10vkkttgxdeqcgeppu20x9qtyvuaxxev8qh0awq/usdt" + + msg := erc20types.MsgDeleteTokenPair{ + Sender: senderAddress.String(), + BankDenom: usdtDenom, + } + + // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) + + gasPrice = chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) +} +``` + + + + +
ParameterTypeDescriptionRequired
senderstringYes
bank_denomstringYes
+ + + +### Response Parameters +> Response Example: + +``` python +txhash: "5AF048ADCE6AF753256F03AF2404A5B78C4C3E7E42A91F0B5C9994372E8AC2FE" +raw_log: "[]" + +gas wanted: 106585 +gas fee: 0.0000532925 INJ +``` + +```go +DEBU[0001] broadcastTx with nonce 3503 fn=func1 src="client/chain/chain.go:598" +DEBU[0002] msg batch committed successfully at height 5214406 fn=func1 src="client/chain/chain.go:619" +txHash=31FDA89C3122322C0559B5766CDF892FD0AA12469017CF8BF88B53441464ECC4 +DEBU[0002] nonce incremented to 3504 fn=func1 src="client/chain/chain.go:623" +DEBU[0002] gas wanted: 133614 fn=func1 src="client/chain/chain.go:624" +gas fee: 0.000066807 INJ +``` + + +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.
+ + +
+ +**TxResponse** + + + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
+ + +
+ +**ABCIMessageLog** + + + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
+ diff --git a/source/includes/_errors.md b/source/includes/_errors.md index a5f08e6d..c8d791be 100644 --- a/source/includes/_errors.md +++ b/source/includes/_errors.md @@ -1,30 +1,477 @@ -# Error Codes - -| Error | Description | -| ----- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| 2 | Spot market was not found or is no longer active | -| 5 | Invalid market ID | -| 6 | Subaccount has insufficient deposits | -| 7 | Invalid order type, sender or fee_recipient address | -| 8 | Position quantity is insufficient for the order (i.e. an RO order cannot be placed if a better order, that would flip the position exists) | -| 9 | Invalid order hash | -| 10 | Subaccount ID is invalid or does not correspond to the sender's address | -| 16 | Invalid price (i.e. the order price is nil, negative or has wrong tick sizes) | -| 17 | Invalid quantity (i.e. the order quantity is nil, negative or has wrong tick sizes) | -| 26 | Order has insufficient margin (i.e. if the margin is less than the initial margin ratio) | -| 27 | Derivative market was not found or is no longer active | -| 28 | Position not found (i.e. when placing RO order with no position open) | -| 29 | Position direction does not oppose the RO order (i.e. when trying to place a sell RO with a short position) | -| 30 | Price surpasses bankruptcy price (i.e. when trying to place an order that would close the position below the bankruptcy price) | -| 32 | Invalid trigger price | -| 36 | Invalid minimum order margin (margin is not a multiple of the tick size) | -| 37 | Exceeds the order side count in derivatives (per market, per subaccount & per side) | -| 39 | Cannot place a conditional market order when a conditional market order in the same relative direction already exists | -| 58 | Message contains cancel all MarketIDs but no SubaccountID or duplicate values | -| 59 | Post-only order exceeds top of book price | -| 60 | Limit order cannot be atomic | -| 81 | No margin locked in the subaccount (when placing RO conditional order with no position or vanilla order) | -| 95 | Insufficient balance | -| 96 | Exchange is in post-only mode (the chain has resumed activities after an upgrade and trading has not been enabled yet) | -| 97 | Client order ID already exists | -| 98 | Client order ID is invalid. Max length is 36 characters | +# Cosmos SDK errors + +## Authz module + + + + + + + + + +
Error CodeDescription
2authorization not found
3expiration time of authorization should be more than current time
4unknown authorization type
5grant key not found
6authorization expired
7grantee and granter should be different
9authorization can be given to msg with only one signer
12max tokens should be positive
+ + +## Bank module + + + + + + + + + +
Error CodeDescription
2no inputs to send transaction
3no outputs to send transaction
4sum inputs != sum outputs
5send transactions are disabled
6client denom metadata not found
7invalid key
8duplicate entry
9multiple senders not allowed
+ + +## Crisis module + + + +
Error CodeDescription
2sender address is empty
3unknown invariant
+ + +## Distribution module + + + + + + + + + + + + + +
Error CodeDescription
2delegator address is empty
3withdraw address is empty
4validator address is empty
5no delegation distribution info
6no validator distribution info
7no validator commission to withdraw
8set withdraw address disabled
9community pool does not have sufficient coins to distribute
10invalid community pool spend proposal amount
11invalid community pool spend proposal recipient
12validator does not exist
13delegation does not exist
+ + +## Evidence module + + + + +
Error CodeDescription
2unregistered handler for evidence type
3invalid evidence
5evidence already exists
+ + +## Feegrant module + + + + + + + +
Error CodeDescription
2fee limit exceeded
3fee allowance expired
4invalid duration
5no allowance
6allowed messages are empty
7message not allowed
+ + +## Gov module + + + + + + + + + + + + + + + + + + + +
Error CodeDescription
3inactive proposal
4proposal already active
5invalid proposal content
6invalid proposal type
7invalid vote option
8invalid genesis state
9no handler exists for proposal type
10proposal message not recognized by router
11no messages proposed
12invalid proposal message
13expected gov account as only signer for proposal message
15metadata too long
16minimum deposit is too small
18invalid proposer
20voting period already ended
21invalid proposal
22summary too long
23invalid deposit denom
+ + +## Nft module + + + + + + + +
Error CodeDescription
3nft class already exists
4nft class does not exist
5nft already exists
6nft does not exist
7empty class id
8empty nft id
+ + +## Slashing module + + + + + + + + + +
Error CodeDescription
2address is not associated with any known validator
3validator does not exist for that address
4validator still jailed; cannot be unjailed
5validator not jailed; cannot be unjailed
6validator has no self-delegation; cannot be unjailed
7validator's self delegation less than minimum; cannot be unjailed
8no validator signing info found
9validator already tombstoned
+ + +## Staking module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error CodeDescription
2empty validator address
3validator does not exist
4validator already exist for this operator address; must use new validator operator address
5validator already exist for this pubkey; must use new validator pubkey
6validator pubkey type is not supported
7validator for this address is currently jailed
8failed to remove validator
9commission must be positive
10commission cannot be more than 100%
11commission cannot be more than the max rate
12commission cannot be changed more than once in 24h
13commission change rate must be positive
14commission change rate cannot be more than the max rate
15commission cannot be changed more than max change rate
16validator's self delegation must be greater than their minimum self delegation
17minimum self delegation cannot be decrease
18empty delegator address
19no delegation for (address, validator) tuple
20delegator does not exist with address
21delegator does not contain delegation
22insufficient delegation shares
23cannot delegate to an empty validator
24not enough delegation shares
25entry not mature
26no unbonding delegation found
27too many unbonding delegation entries for (delegator, validator) tuple
28no redelegation found
29cannot redelegate to the same validator
30too few tokens to redelegate (truncates to zero tokens)
31redelegation destination validator not found
32redelegation to this validator already in progress; first redelegation to this validator must complete before next redelegation
33too many redelegation entries for (delegator, src-validator, dst-validator) tuple
34cannot delegate to validators with invalid (zero) ex-rate
35both shares amount and shares percent provided
36neither shares amount nor shares percent provided
37invalid historical info
38no historical info found
39empty validator public key
40commission cannot be less than min rate
41unbonding operation not found
42cannot un-hold unbonding operation that is not on hold
43expected authority account as only signer for proposal message
44redelegation source validator not found
45unbonding type not found
70commission rate too small
+ + +## Upgrade module + + + + + + +
Error CodeDescription
2module version not found
3upgrade plan not found
4upgraded client not found
5upgraded consensus state not found
6expected authority account as only signer for proposal message
+ + +# Injective errors + +## Auction module + + + +
Error CodeDescription
1invalid bid denom
2invalid bid round
+ + +## Erc20 module + + + + + + + + + + + +
Error CodeDescription
2attempting to create a token pair for bank denom that already has a pair associated
3unauthorized account
4invalid genesis
5invalid token pair
6invalid ERC20 contract address
7unknown bank denom or zero supply
8error uploading ERC20 contract
9invalid token factory denom
10respective erc20:... denom has existing supply
11invalid query request
+ + +## Exchange module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error CodeDescription
1failed to validate order
2spot market not found
3spot market exists
4struct field error
5failed to validate market
6subaccount has insufficient deposits
7unrecognized order type
8position quantity insufficient for order
9order hash is not valid
10subaccount id is not valid
11invalid ticker
12invalid base denom
13invalid quote denom
14invalid oracle
15invalid expiry
16invalid price
17invalid quantity
18unsupported oracle type
19order doesnt exist
20spot limit orderbook fill invalid
21perpetual market exists
22expiry futures market exists
23expiry futures market expired
24no liquidity on the orderbook!
25Orderbook liquidity cannot satisfy current worst price
26insufficient margin
27Derivative market not found
28Position not found
29Position direction does not oppose the reduce-only order
30Price Surpasses Bankruptcy Price
31Position not liquidable
32invalid trigger price
33invalid oracle type
34invalid minimum price tick size
35invalid minimum quantity tick size
36invalid minimum order margin
37Exceeds order side count
38Subaccount cannot place a market order when a market order in the same market was already placed in same block
39cannot place a conditional market order when a conditional market order in same relative direction already exists
40An equivalent market launch proposal already exists.
41Invalid Market Status
42base denom cannot be same with quote denom
43oracle base cannot be same with oracle quote
44MakerFeeRate does not match TakerFeeRate requirements
45Ensure that MaintenanceMarginRatio < InitialMarginRatio <= ReduceMarginRatio
46OracleScaleFactor cannot be greater than MaxOracleScaleFactor
47Spot exchange is not enabled yet
48Derivatives exchange is not enabled yet
49Oracle price delta exceeds threshold
50Invalid hourly interest rate
51Invalid hourly funding rate cap
52Only perpetual markets can update funding parameters
53Invalid trading reward campaign
54Invalid fee discount schedule
55invalid liquidation order
56Unknown error happened for campaign distributions
57Invalid trading reward points update
58Invalid batch msg update
59Post-only order exceeds top of book price
60Order type not supported for given message
61Sender must match dmm account
62already opted out of rewards
63Invalid margin ratio
64Provided funds are below minimum
65Position is below initial margin requirement
66Pool has non-positive total lp token supply
67Passed lp token burn amount is greater than total lp token supply
68unsupported action
69position quantity cannot be negative
70binary options market exists
71binary options market not found
72invalid settlement
73account doesnt exist
74sender should be a market admin
75market is already scheduled to settle
76market not found
77denom decimal cannot be higher than max scale factor
78state is invalid
79transient orders up to cancellation not supported
80invalid trade
81no margin locked in subaccount
82Invalid access level to perform action
83Invalid address
84Invalid argument
85Invalid funds direction
86No funds provided
87Invalid signature
88no funds to unlock
89No msgs provided
90No msg provided
91Invalid amount
92The current feature has been disabled
93Order has too much margin
94Subaccount nonce is invalid
95insufficient funds
96exchange is in post-only mode
97client order id already exists
98client order id is invalid. Max length is 36 chars
99market cannot be settled in emergency mode
100invalid notional
101stale oracle price
102invalid stake grant
103insufficient stake for grant
104invalid permissions
105the decimals specified for the denom is incorrect
106insufficient market balance
107invalid expiration block
108v1 perpetual and expiry market launch proposal is not supported
+ + +## Insurance module + + + + + + + + + + + + + +
Error CodeDescription
1insurance fund already exists
2insurance fund not found
3redemption already exists
4invalid deposit amount
5invalid deposit denom
6insurance payout exceeds deposits
7invalid ticker
8invalid quote denom
9invalid oracle
10invalid expiration time
11invalid marketID
12invalid share denom
+ + +## Ocr module + + + + + + + + + + + + + + + + + + + + + + + + +
Error CodeDescription
1stale report
2incomplete proposal
3repeated oracle address
4too many signers
5incorrect config
6config digest doesn't match
7wrong number of signatures
8incorrect signature
9no transmitter specified
10incorrect transmission data
11no transmissions found
12median value is out of bounds
13LINK denom doesn't match
14Reward Pool doesn't exist
15wrong number of payees and transmitters
16action is restricted to the module admin
17feed already exists
19feed doesnt exists
20action is admin-restricted
21insufficient reward pool
22payee already set
23action is payee-restricted
24feed config not found
+ + +## Oracle module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error CodeDescription
1relayer address is empty
2bad rates count
3bad resolve times
4bad request ID
5relayer not authorized
6bad price feed base count
7bad price feed quote count
8unsupported oracle type
9bad messages count
10bad Coinbase message
11bad Ethereum signature
12bad Coinbase message timestamp
13Coinbase price not found
14Prices must be positive
15Prices must be less than 10 million.
16Invalid Band IBC Request
17sample error
18invalid packet timeout
19invalid symbols count
20could not claim port capability
21invalid IBC Port ID
22invalid IBC Channel ID
23invalid Band IBC request interval
24Invalid Band IBC Update Request Proposal
25Band IBC Oracle Request not found
26Base Info is empty
27provider is empty
28invalid provider name
29invalid symbol
30relayer already exists
31provider price not found
32invalid oracle request
33no price for oracle was found
34no address for Pyth contract found
35unauthorized Pyth price relay
36unauthorized Pyth price relay
37unauthorized Pyth price relay
38unauthorized Pyth price relay
39empty price attestations
40bad Stork message timestamp
41sender stork is empty
42invalid stork signature
43stork asset id not unique
+ + +## Peggy module + + + + + + + + + + + + + + + + +
Error CodeDescription
1internal
2duplicate
3invalid
4timeout
5unknown
6empty
7outdated
8unsupported
9non contiguous event nonce
10no unbatched txs found
11can not set orchestrator addresses more than once
12supply cannot exceed max ERC20 value
13invalid ethereum sender on claim
14invalid ethereum destination
15missing previous claim for validator
+ + +## Permissions module + + + + + + + + + + + + + + + + +
Error CodeDescription
2attempting to create a namespace for denom that already exists
3unauthorized account
4invalid genesis
5invalid namespace
6invalid permissions
7unknown role
8unknown contract address
9restricted action
10invalid role
11namespace for denom does not exist
12wasm hook query error
13voucher was not found
14invalid contract hook
15unknown policy
16unauthorized policy change
+ + +## Tokenfactory module + + + + + + + + + +
Error CodeDescription
2attempting to create a denom that already exists (has bank metadata)
3unauthorized account
4invalid denom
5invalid creator
6invalid authority metadata
7invalid genesis
12denom does not exist
13amount has to be positive
+ + +## Wasmx module + + + + + + + + + + + + +
Error CodeDescription
1invalid gas limit
2invalid gas price
3invalid contract address
4contract already registered
5duplicate contract
6no contract addresses found
7invalid code id
8not possible to deduct gas fees
9missing granter address
10granter address does not exist
11invalid funding mode
+ + diff --git a/source/includes/_evm.md b/source/includes/_evm.md new file mode 100644 index 00000000..082da811 --- /dev/null +++ b/source/includes/_evm.md @@ -0,0 +1,1467 @@ +# - EVM + +Includes all the messages and queries related to the native EVM implementation. + + +## Account + +Queries an Ethereum account + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + erc20_address = "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + result = await client.fetch_evm_account(address=erc20_address) + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + evmAddress := "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + res, err := chainClient.FetchEVMAccount(ctx, evmAddress) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + +
ParameterTypeDescriptionRequired
addressstringaddress is the ethereum hex address to query the account for.Yes
+ + +### Response Parameters +> Response Example: + +``` json +{ + "balance": "0", + "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" +} +``` + + + + +
ParameterTypeDescription
balancestringbalance is the balance of the EVM denomination.
code_hashstringcode_hash is the hex-formatted code bytes from the EOA.
nonceuint64nonce is the account's sequence number.
+ + + +## CosmosAccount + +Queries an Ethereum account's Cosmos Address + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + erc20_address = "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + result = await client.fetch_evm_cosmos_account(address=erc20_address) + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + evmAddress := "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + res, err := chainClient.FetchEVMCosmosAccount(ctx, evmAddress) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + +
ParameterTypeDescriptionRequired
addressstringaddress is the ethereum hex address to query the account for.Yes
+ + +### Response Parameters +> Response Example: + +``` json +{ + "cosmos_address": "inj1ml2jj0vwx37luk0fpm74tv54dgf5893aq47asq" +} +``` + + + + +
ParameterTypeDescription
cosmos_addressstringcosmos_address is the cosmos address of the account.
sequenceuint64sequence is the account's sequence number.
account_numberuint64account_number is the account number
+ + + +## ValidatorAccount + +Queries an Ethereum account's from a validator consensus Address + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + cons_address = "injvalcons1h5u937etuat5hnr2s34yaaalfpkkscl5ndadqm" + result = await client.fetch_evm_validator_account(cons_address=cons_address) + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + consAddress := "injvalcons1h5u937etuat5hnr2s34yaaalfpkkscl5ndadqm" + res, err := chainClient.FetchEVMValidatorAccount(ctx, consAddress) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + +
ParameterTypeDescriptionRequired
cons_addressstringcons_address is the validator cons address to query the account for.Yes
+ + +### Response Parameters +> Response Example: + +``` json + +``` + + + + +
ParameterTypeDescription
account_addressstringaccount_address is the cosmos address of the account in bech32 format.
sequenceuint64sequence is the account's sequence number.
account_numberuint64account_number is the account number
+ + + +## Balance + +Queries an Ethereum account's from a validator consensus Address + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + erc20_address = "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + result = await client.fetch_evm_balance(address=erc20_address) + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + evmAddress := "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + res, err := chainClient.FetchEVMBalance(ctx, evmAddress) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + +
ParameterTypeDescriptionRequired
addressstringaddress is the ethereum hex address to query the balance for.Yes
+ + +### Response Parameters +> Response Example: + +``` json +{ + "balance": "0" +} +``` + + +
ParameterTypeDescription
balancestringbalance is the balance of the EVM denomination.
+ + + +## Storage + +Queries the balance of all coins for a single account + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + erc20_address = "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + key = "key" + result = await client.fetch_evm_storage(address=erc20_address, key=key) + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + evmAddress := "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + key := "key" + res, err := chainClient.FetchEVMStorage(ctx, evmAddress, &key) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + + +
ParameterTypeDescriptionRequired
addressstringaddress is the ethereum hex address to query the storage state for.Yes
keystringkey defines the key of the storage stateYes
+ + +### Response Parameters +> Response Example: + +``` json +{ + "value": "0x0000000000000000000000000000000000000000000000000000000000000000" +} +``` + + +
ParameterTypeDescription
valuestringvalue defines the storage state value hash associated with the given key.
+ + + +## Code + +Queries the balance of all coins for a single account + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + evm_address = "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + result = await client.fetch_evm_code(address=evm_address) + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + evmAddress := "0xDFd5293D8e347dFe59E90eFd55b2956a1343963d" + res, err := chainClient.FetchEVMCode(ctx, evmAddress) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + + +
ParameterTypeDescriptionRequired
addressstringaddress is the ethereum hex address to query the code for.Yes
+ + +### Response Parameters +> Response Example: + +``` json + +``` + + +
ParameterTypeDescription
codebyte arraycode represents the code bytes from an ethereum address.
+ + + +## BaseFee + +Queries the base fee of the parent block of the current block, it's similar to feemarket module's method, but also checks london hardfork status + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective import PrivateKey +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + result = await client.fetch_evm_base_fee() + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + res, err := chainClient.FetchEVMBaseFee(ctx) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", "\t") + fmt.Print(string(str)) + +} +``` + + +No parameters + +### Response Parameters +> Response Example: + +``` json + +``` + + +
ParameterTypeDescription
base_feecosmossdk_io_math.Intbase_fee is the EIP1559 base fee
+ + + +## MsgCreateTokenPair + +Creates a new ERC20 token + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk +from pyinjective.core.network import Network +from pyinjective.wallet import PrivateKey + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + composer = await client.composer() + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=configured_private_key, + gas_price=gas_price, + client=client, + composer=composer, + ) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + usdt_denom = "factory/inj10vkkttgxdeqcgeppu20x9qtyvuaxxev8qh0awq/usdt" + usdt_erc20 = "0xdAC17F958D2ee523a2206206994597C13D831ec7" + + # prepare tx msg + msg = composer.msg_create_token_pair( + sender=address.to_acc_bech32(), + bank_denom=usdt_denom, + erc20_address=usdt_erc20, + ) + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + message_broadcaster.update_gas_price(gas_price=gas_price) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + + erc20types "github.com/InjectiveLabs/sdk-go/chain/erc20/types" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + if err != nil { + panic(err) + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + ) + + if err != nil { + panic(err) + } + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) + + usdtDenom := "factory/inj10vkkttgxdeqcgeppu20x9qtyvuaxxev8qh0awq/usdt" + usdtERC20 := "0xdAC17F958D2ee523a2206206994597C13D831ec7" + + msg := erc20types.MsgCreateTokenPair{ + Sender: senderAddress.String(), + TokenPair: erc20types.TokenPair{ + BankDenom: usdtDenom, + Erc20Address: usdtERC20, + }, + } + + // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) + + gasPrice = chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) +} +``` + + + + +
ParameterTypeDescriptionRequired
senderstringYes
token_pairTokenPairYes
+ + +
+ +**TokenPair** + + + +
ParameterTypeDescription
bank_denomstring
erc20_addressstring
+ + +### Response Parameters +> Response Example: + +``` json +``` + + +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.
+ + +
+ +**TxResponse** + + + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
+ + +
+ +**ABCIMessageLog** + + + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
+ + + +## MsgDeleteTokenPair + +Deletes an ERC20 token + +**IP rate limit group:** `chain` + + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os + +import dotenv + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk +from pyinjective.core.network import Network +from pyinjective.wallet import PrivateKey + + +async def main() -> None: + dotenv.load_dotenv() + configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + composer = await client.composer() + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=configured_private_key, + gas_price=gas_price, + client=client, + composer=composer, + ) + + # load account + priv_key = PrivateKey.from_hex(configured_private_key) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + await client.fetch_account(address.to_acc_bech32()) + + usdt_denom = "factory/inj10vkkttgxdeqcgeppu20x9qtyvuaxxev8qh0awq/usdt" + + # prepare tx msg + msg = composer.msg_delete_token_pair( + sender=address.to_acc_bech32(), + bank_denom=usdt_denom, + ) + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + message_broadcaster.update_gas_price(gas_price=gas_price) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + + erc20types "github.com/InjectiveLabs/sdk-go/chain/erc20/types" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + if err != nil { + panic(err) + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + ) + + if err != nil { + panic(err) + } + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) + + usdtDenom := "factory/inj10vkkttgxdeqcgeppu20x9qtyvuaxxev8qh0awq/usdt" + + msg := erc20types.MsgDeleteTokenPair{ + Sender: senderAddress.String(), + BankDenom: usdtDenom, + } + + // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) + + gasPrice = chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) +} +``` + + + + +
ParameterTypeDescriptionRequired
senderstringYes
bank_denomstringYes
+ + + +### Response Parameters +> Response Example: + +``` python +txhash: "5AF048ADCE6AF753256F03AF2404A5B78C4C3E7E42A91F0B5C9994372E8AC2FE" +raw_log: "[]" + +gas wanted: 106585 +gas fee: 0.0000532925 INJ +``` + +```go +DEBU[0001] broadcastTx with nonce 3503 fn=func1 src="client/chain/chain.go:598" +DEBU[0002] msg batch committed successfully at height 5214406 fn=func1 src="client/chain/chain.go:619" +txHash=31FDA89C3122322C0559B5766CDF892FD0AA12469017CF8BF88B53441464ECC4 +DEBU[0002] nonce incremented to 3504 fn=func1 src="client/chain/chain.go:623" +DEBU[0002] gas wanted: 133614 fn=func1 src="client/chain/chain.go:624" +gas fee: 0.000066807 INJ +``` + + +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.
+ + +
+ +**TxResponse** + + + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
+ + +
+ +**ABCIMessageLog** + + + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
+ diff --git a/source/includes/_explorerrpc.md b/source/includes/_explorerrpc.md index 0d327282..eaca1ed3 100644 --- a/source/includes/_explorerrpc.md +++ b/source/includes/_explorerrpc.md @@ -12,29 +12,34 @@ Get the details for a specific transaction. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient -from pyinjective.composer import Composer +from pyinjective.composer_v2 import Composer from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) - composer = Composer(network=network.string()) + client = IndexerClient(network=network) + composer = Composer(network=network) + tx_hash = "0F3EBEC1882E1EEAC5B7BDD836E976250F1CD072B79485877CEACCB92ACDDF52" transaction_response = await client.fetch_tx_by_tx_hash(tx_hash=tx_hash) - print(transaction_response) + print("Transaction response:") + print(f"{json.dumps(transaction_response, indent=2)}\n") transaction_messages = composer.unpack_transaction_messages(transaction_data=transaction_response["data"]) - print(transaction_messages) + print("Transaction messages:") + print(f"{json.dumps(transaction_messages, indent=2)}\n") first_message = transaction_messages[0] - print(first_message) + print("First message:") + print(f"{json.dumps(first_message, indent=2)}\n") if __name__ == "__main__": @@ -42,8 +47,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -70,7 +75,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -267,22 +272,24 @@ Get the details for a specific transaction. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption -from pyinjective.composer import Composer +from pyinjective.composer_v2 import Composer from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) - composer = Composer(network=network.string()) + client = IndexerClient(network=network) + composer = Composer(network=network) + address = "inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex" message_type = "cosmos.bank.v1beta1.MsgSend" limit = 2 @@ -292,11 +299,14 @@ async def main() -> None: message_type=message_type, pagination=pagination, ) - print(transactions_response) + print("Transactions response:") + print(f"{json.dumps(transactions_response, indent=2)}\n") first_transaction_messages = composer.unpack_transaction_messages(transaction_data=transactions_response["data"][0]) - print(first_transaction_messages) + print("First transaction messages:") + print(f"{json.dumps(first_transaction_messages, indent=2)}\n") first_message = first_transaction_messages[0] - print(first_message) + print("First message:") + print(f"{json.dumps(first_message, indent=2)}\n") if __name__ == "__main__": @@ -304,8 +314,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -341,7 +351,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -683,24 +693,25 @@ Get data for blocks. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) limit = 2 pagination = PaginationOption(limit=limit) blocks = await client.fetch_blocks(pagination=pagination) - print(blocks) + print(json.dumps(blocks, indent=2)) if __name__ == "__main__": @@ -708,8 +719,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -735,7 +746,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -852,22 +863,23 @@ Get detailed data for a single block. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) block_height = "5825046" block = await client.fetch_block(block_id=block_height) - print(block) + print(json.dumps(block, indent=2)) if __name__ == "__main__": @@ -875,8 +887,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -903,7 +915,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1020,24 +1032,25 @@ Get the transactions. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) limit = 2 pagination = PaginationOption(limit=limit) txs = await client.fetch_txs(pagination=pagination) - print(txs) + print(json.dumps(txs, indent=2)) if __name__ == "__main__": @@ -1045,8 +1058,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1080,7 +1093,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1249,16 +1262,16 @@ Stream transactions. > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def tx_event_processor(event: Dict[str, Any]): @@ -1276,7 +1289,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) task = asyncio.get_event_loop().create_task( client.listen_txs_updates( @@ -1295,8 +1308,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1331,7 +1344,7 @@ func main() { if err != nil { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -1442,16 +1455,16 @@ Stream blocks. > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def block_event_processor(event: Dict[str, Any]): @@ -1469,7 +1482,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) task = asyncio.get_event_loop().create_task( client.listen_blocks_updates( @@ -1488,8 +1501,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1524,7 +1537,7 @@ func main() { if err != nil { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -1623,22 +1636,23 @@ Get info on peggy deposits. By default, deposits for all senders and receivers w ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) receiver = "inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex" peggy_deposits = await client.fetch_peggy_deposit_txs(receiver=receiver) - print(peggy_deposits) + print(json.dumps(peggy_deposits, indent=2)) if __name__ == "__main__": @@ -1646,8 +1660,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1682,7 +1696,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1823,25 +1837,26 @@ Get info on peggy withdrawals. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) sender = "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku" limit = 2 pagination = PaginationOption(limit=limit) peggy_deposits = await client.fetch_peggy_withdrawal_txs(sender=sender, pagination=pagination) - print(peggy_deposits) + print(json.dumps(peggy_deposits, indent=2)) if __name__ == "__main__": @@ -1849,8 +1864,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1884,7 +1899,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2044,20 +2059,21 @@ Get data on IBC transfers. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network=network) sender = "inj1cll5cv3ezgal30gagkhnq2um6zf6qrmhw4r6c8" receiver = "cosmos1usr9g5a4s2qrwl63sdjtrs2qd4a7huh622pg82" src_channel = "channel-2" @@ -2076,7 +2092,7 @@ async def main() -> None: dest_port=dest_port, pagination=pagination, ) - print(ibc_transfers) + print(json.dumps(ibc_transfers, indent=2)) if __name__ == "__main__": @@ -2084,8 +2100,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2119,7 +2135,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2248,21 +2264,22 @@ List all cosmwasm code on injective chain. Results are paginated. > Request Example: - - + + ```py import asyncio +import json import logging -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # network: Network = Network.testnet() - network: Network = Network.testnet() - client: AsyncClient = AsyncClient(network) + network = Network.testnet() + client = IndexerClient(network=network) pagination = PaginationOption( limit=10, @@ -2274,7 +2291,7 @@ async def main() -> None: pagination=pagination, ) print("Wasm codes:") - print(wasm_codes) + print(json.dumps(wasm_codes, indent=2)) if __name__ == "__main__": @@ -2283,8 +2300,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2317,7 +2334,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2469,20 +2486,20 @@ Get cosmwasm code by its code ID > Request Example: - - + + ```py import asyncio +import json import logging -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: - # network: Network = Network.testnet() - network: Network = Network.testnet() - client: AsyncClient = AsyncClient(network) + network = Network.testnet() + client = IndexerClient(network=network) code_id = 2008 @@ -2490,7 +2507,7 @@ async def main() -> None: code_id=code_id, ) print("Wasm code:") - print(wasm_code) + print(json.dumps(wasm_code, indent=2)) if __name__ == "__main__": @@ -2499,8 +2516,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2533,7 +2550,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2603,21 +2620,21 @@ Get cosmwasm instantiated contracts on injective-chain. Results are paginated. > Request Example: - - + + ```py import asyncio +import json import logging -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: - # network: Network = Network.testnet() - network: Network = Network.testnet() - client: AsyncClient = AsyncClient(network) + network = Network.testnet() + client = IndexerClient(network=network) pagination = PaginationOption( limit=10, @@ -2630,7 +2647,7 @@ async def main() -> None: pagination=pagination, ) print("Wasm contracts:") - print(wasm_contracts) + print(json.dumps(wasm_contracts, indent=2)) if __name__ == "__main__": @@ -2639,8 +2656,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2671,7 +2688,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2851,26 +2868,26 @@ Get cosmwasm contract by its address > Request Example: - - + + ```py import asyncio +import json import logging -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: - # network: Network = Network.testnet() - network: Network = Network.testnet() - client: AsyncClient = AsyncClient(network) + network = Network.testnet() + client = IndexerClient(network=network) address = "inj1yhz4e7df95908jhs9erl87vdzjkdsc24q7afjf" wasm_contract = await client.fetch_wasm_contract_by_address(address=address) print("Wasm contract:") - print(wasm_contract) + print(json.dumps(wasm_contract, indent=2)) if __name__ == "__main__": @@ -2879,8 +2896,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2912,7 +2929,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -3004,26 +3021,26 @@ Get CW20 balances of an injective account across all instantiated CW20 contracts > Request Example: - - + + ```py import asyncio +import json import logging -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: - # network: Network = Network.testnet() - network: Network = Network.testnet() - client: AsyncClient = AsyncClient(network) + network = Network.testnet() + client = IndexerClient(network=network) address = "inj1phd706jqzd9wznkk5hgsfkrc8jqxv0kmlj0kex" balance = await client.fetch_cw20_balance(address=address) print("Cw20 balance:") - print(balance) + print(json.dumps(balance, indent=2)) if __name__ == "__main__": @@ -3032,8 +3049,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3065,7 +3082,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -3154,8 +3171,8 @@ Returns contract-related transactions ### Request Parameters > Request Example: - - + + ```go package main @@ -3192,7 +3209,7 @@ func main() { response, err := explorerClient.FetchContractTxs(ctx, req) if err != nil { - log.Fatalf("Failed to fetch contract transactions: %v", err) + log.Panicf("Failed to fetch contract transactions: %v", err) } fmt.Println("Total Contract Transactions:", len(response.Data)) @@ -3202,7 +3219,7 @@ func main() { fmt.Printf("\n\n") fmt.Println("Full response:") - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) } ``` @@ -3639,15 +3656,15 @@ Returns contract-related transactions ### Request Parameters > Request Example: - - + + ```py import asyncio import time -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: @@ -3655,7 +3672,7 @@ async def main() -> None: network = Network.testnet() # Initialize client - client = AsyncClient(network) + client = IndexerClient(network=network) try: # Example parameters for fetching contract transactions @@ -3692,8 +3709,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -3726,12 +3743,12 @@ func main() { req := &explorerPB.GetContractTxsV2Request{ Address: contractAddress, - Limit: 10, // Fetch 10 transactions + PerPage: 10, // Fetch 10 transactions } response, err := explorerClient.FetchContractTxsV2(ctx, req) if err != nil { - log.Fatalf("Failed to fetch contract transactions V2: %v", err) + log.Panicf("Failed to fetch contract transactions V2: %v", err) } fmt.Println("Total Contract Transactions:", len(response.Data)) @@ -3741,7 +3758,7 @@ func main() { fmt.Printf("\n\n") fmt.Println("Full response:") - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) } ``` @@ -4172,21 +4189,20 @@ Returns validators on the active chain ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main(): # Select network: choose between testnet, mainnet, or local network = Network.testnet() - - # Initialize AsyncClient - client = AsyncClient(network) + client = IndexerClient(network=network) try: # Fetch validators @@ -4194,7 +4210,7 @@ async def main(): # Print validators print("Validators:") - print(validators) + print(json.dumps(validators, indent=2)) except Exception as e: print(f"Error: {e}") @@ -4205,8 +4221,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4235,11 +4251,11 @@ func main() { response, err := explorerClient.FetchValidators(ctx) if err != nil { - log.Fatalf("Failed to fetch validators: %v", err) + log.Panicf("Failed to fetch validators: %v", err) } fmt.Println("Full response:") - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) } ``` @@ -4379,21 +4395,21 @@ Returns validator information on the active chain ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main(): # Select network: choose between testnet, mainnet, or local network = Network.testnet() + client = IndexerClient(network=network) - # Initialize AsyncClient - client = AsyncClient(network) address = "injvaloper1kk523rsm9pey740cx4plalp40009ncs0wrchfe" try: @@ -4402,7 +4418,7 @@ async def main(): # Print validators print("Validator:") - print(validator) + print(json.dumps(validator, indent=2)) except Exception as e: print(f"Error: {e}") @@ -4413,8 +4429,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4446,11 +4462,11 @@ func main() { response, err := explorerClient.FetchValidator(ctx, validatorAddress) if err != nil { - log.Fatalf("Failed to fetch validator: %v", err) + log.Panicf("Failed to fetch validator: %v", err) } fmt.Println("Validator:") - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) } ``` @@ -4560,21 +4576,21 @@ Returns validator uptime information on the active chain ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main(): # Select network: choose between testnet, mainnet, or local network = Network.testnet() + client = IndexerClient(network=network) - # Initialize AsyncClient - client = AsyncClient(network) address = "injvaloper1kk523rsm9pey740cx4plalp40009ncs0wrchfe" try: @@ -4583,7 +4599,7 @@ async def main(): # Print uptime print("Validator uptime:") - print(uptime) + print(json.dumps(uptime, indent=2)) except Exception as e: print(f"Error: {e}") @@ -4594,8 +4610,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -4627,11 +4643,11 @@ func main() { response, err := explorerClient.FetchValidatorUptime(ctx, validatorAddress) if err != nil { - log.Fatalf("Failed to fetch validator uptime: %v", err) + log.Panicf("Failed to fetch validator uptime: %v", err) } fmt.Println("Validator uptime:") - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) } ``` @@ -5079,29 +5095,28 @@ Request relayers infos by marketIDs. If no ids are provided, all market with ass ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main(): # Select network: choose between testnet, mainnet, or local network = Network.testnet() - - # Initialize AsyncClient - client = AsyncClient(network) + client = IndexerClient(network=network) try: # Fetch relayers - validators = await client.fetch_relayers() + relayers = await client.fetch_relayers() # Print relayers print("Relayers:") - print(validators) + print(json.dumps(relayers, indent=2)) except Exception as e: print(f"Error: {e}") @@ -5112,8 +5127,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -5145,11 +5160,11 @@ func main() { response, err := explorerClient.FetchRelayers(ctx, marketIds) if err != nil { - log.Fatalf("Failed to fetch relayers: %v", err) + log.Panicf("Failed to fetch relayers: %v", err) } fmt.Println("Relayers:") - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) } ``` @@ -5200,22 +5215,21 @@ Returns bank transfers ### Request Parameters > Request Example: - - + + ```py import asyncio import json import logging -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: - # network: Network = Network.testnet() - network: Network = Network.testnet() - client: AsyncClient = AsyncClient(network) + network = Network.testnet() + client = IndexerClient(network=network) pagination = PaginationOption(limit=5) senders = ["inj17xpfvakm2amg962yls6f84z3kell8c5l6s5ye9"] @@ -5231,8 +5245,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -5267,11 +5281,11 @@ func main() { response, err := explorerClient.FetchBankTransfers(ctx, req) if err != nil { - log.Fatalf("Failed to fetch bank transfers: %v", err) + log.Panicf("Failed to fetch bank transfers: %v", err) } fmt.Println("Bank transfers:") - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) } ``` diff --git a/source/includes/_ibccorechannel.md b/source/includes/_ibccorechannel.md index 079ccfa5..138c9631 100644 --- a/source/includes/_ibccorechannel.md +++ b/source/includes/_ibccorechannel.md @@ -11,14 +11,14 @@ Queries an IBC Channel ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -39,8 +39,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -60,7 +60,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -91,7 +91,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -110,7 +110,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -216,14 +216,14 @@ Queries all the IBC channels of a chain ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -244,8 +244,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -267,7 +267,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -298,7 +298,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -316,7 +316,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -493,14 +493,14 @@ Queries all the channels associated with a connection end ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -522,8 +522,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -545,7 +545,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -576,7 +576,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -595,7 +595,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -787,14 +787,14 @@ Queries the client state for the channel associated with the provided channel id ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -815,8 +815,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -835,7 +835,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -866,7 +866,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1056,14 +1056,14 @@ Queries the client state for the channel associated with the provided channel id ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1088,8 +1088,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1108,7 +1108,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1139,7 +1139,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1221,14 +1221,14 @@ Queries a stored packet commitment hash ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1250,8 +1250,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1271,7 +1271,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1302,7 +1302,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1322,7 +1322,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1374,14 +1374,14 @@ Returns all the packet commitments hashes associated with a channel ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1408,8 +1408,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1431,7 +1431,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1462,7 +1462,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1482,7 +1482,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1582,14 +1582,14 @@ Queries if a given packet sequence has been received on the queried chain ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1611,8 +1611,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1632,7 +1632,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1663,7 +1663,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1683,7 +1683,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1735,14 +1735,14 @@ Queries a stored packet acknowledgement hash ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1766,8 +1766,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1787,7 +1787,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1818,7 +1818,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1838,7 +1838,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1890,14 +1890,14 @@ Returns all the packet acknowledgements associated with a channel ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1926,8 +1926,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1949,7 +1949,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1980,7 +1980,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2001,7 +2001,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2096,14 +2096,14 @@ Returns all the unreceived IBC packets associated with a channel and sequences ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2127,8 +2127,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2148,7 +2148,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2179,7 +2179,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2199,7 +2199,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2251,14 +2251,14 @@ Returns all the unreceived IBC acknowledgements associated with a channel and se ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2282,8 +2282,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2303,7 +2303,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2334,7 +2334,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2354,7 +2354,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2406,14 +2406,14 @@ Returns the next receive sequence for a given channel ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2437,8 +2437,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2458,7 +2458,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2489,7 +2489,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2508,7 +2508,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } diff --git a/source/includes/_ibccoreclient.md b/source/includes/_ibccoreclient.md index 70aa0a6e..350550e3 100644 --- a/source/includes/_ibccoreclient.md +++ b/source/includes/_ibccoreclient.md @@ -11,14 +11,14 @@ Queries an IBC light client ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -38,8 +38,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -58,7 +58,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -89,7 +89,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -228,14 +228,14 @@ Queries all the IBC light clients of a chain ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -256,8 +256,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -278,7 +278,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -309,7 +309,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -907,14 +907,14 @@ Queries a consensus state associated with a client state at a given height ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -938,8 +938,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -958,7 +958,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -989,7 +989,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1070,14 +1070,14 @@ Queries all the consensus state associated with a given client ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1099,8 +1099,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1121,7 +1121,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1152,7 +1152,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1285,14 +1285,14 @@ Queries the height of every consensus states associated with a given client ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1314,8 +1314,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1336,7 +1336,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1367,7 +1367,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1451,14 +1451,14 @@ Queries the status of an IBC client ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1478,8 +1478,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1499,7 +1499,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1530,7 +1530,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1548,7 +1548,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1582,14 +1582,14 @@ Queries all parameters of the ibc client submodule ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1607,8 +1607,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1628,7 +1628,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1659,7 +1659,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1676,7 +1676,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1721,14 +1721,14 @@ Queries an Upgraded IBC light client ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1746,8 +1746,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1767,7 +1767,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1798,7 +1798,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1815,7 +1815,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1845,14 +1845,14 @@ Queries an Upgraded IBC consensus state ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1870,8 +1870,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1891,7 +1891,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1922,7 +1922,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1939,7 +1939,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } diff --git a/source/includes/_ibccoreconnection.md b/source/includes/_ibccoreconnection.md index 1846e72b..d2815efc 100644 --- a/source/includes/_ibccoreconnection.md +++ b/source/includes/_ibccoreconnection.md @@ -11,14 +11,14 @@ Queries an IBC connection end ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -38,8 +38,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -59,7 +59,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -90,7 +90,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -108,7 +108,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -228,14 +228,14 @@ Queries all the IBC connections of a chain ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -256,8 +256,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -279,7 +279,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -310,7 +310,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -328,7 +328,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -542,14 +542,14 @@ Queries the connection paths associated with a client state ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -569,8 +569,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -590,7 +590,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -621,7 +621,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -639,7 +639,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -691,14 +691,14 @@ Queries the client state associated with the connection ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -718,8 +718,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -738,7 +738,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -769,7 +769,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -920,14 +920,14 @@ Queries the consensus state associated with the connection ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -951,8 +951,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -971,7 +971,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1002,7 +1002,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1083,14 +1083,14 @@ Queries all parameters of the ibc connection submodule ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1108,8 +1108,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1129,7 +1129,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1160,7 +1160,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1177,7 +1177,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } diff --git a/source/includes/_ibctransfer.md b/source/includes/_ibctransfer.md index 8f657f5a..a8b03598 100644 --- a/source/includes/_ibctransfer.md +++ b/source/includes/_ibctransfer.md @@ -11,15 +11,15 @@ Queries a denomination trace information ### Request Parameters > Request Example: - - + + ```py import asyncio from hashlib import sha256 from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -43,8 +43,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -66,7 +66,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -97,7 +97,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -118,7 +118,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -164,14 +164,14 @@ Queries all denomination traces ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -192,8 +192,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -214,7 +214,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -245,7 +245,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -263,7 +263,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -340,14 +340,14 @@ Queries a denomination hash information ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -369,8 +369,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -390,7 +390,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -421,7 +421,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -441,7 +441,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -475,14 +475,14 @@ Returns the escrow address for a particular port and channel id ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -503,8 +503,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -524,7 +524,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -555,7 +555,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -574,7 +574,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -609,14 +609,14 @@ Returns the total amount of tokens in escrow based on the denom ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -636,8 +636,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -657,7 +657,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -688,7 +688,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -706,7 +706,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -737,9 +737,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
@@ -752,8 +752,8 @@ Defines a msg to transfer fungible tokens (i.e Coins) between ICS20 enabled chai ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -762,7 +762,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -797,7 +797,10 @@ async def main() -> None: source_port = "transfer" source_channel = "channel-126" - token_amount = composer.create_coin_amount(amount=Decimal("0.1"), token_name="INJ") + token_decimals = 18 + transfer_amount = Decimal("0.1") * Decimal(f"1e{token_decimals}") + inj_chain_denom = "inj" + token_amount = composer.coin(amount=int(transfer_amount), denom=inj_chain_denom) sender = address.to_acc_bech32() receiver = "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r" timeout_height = 10 @@ -828,29 +831,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" - "github.com/InjectiveLabs/sdk-go/client/common" - - chainclient "github.com/InjectiveLabs/sdk-go/client/chain" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibccoretypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -880,7 +885,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -889,7 +894,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -913,16 +921,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -945,9 +953,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int

@@ -965,73 +973,36 @@ func main() { ``` json ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
\ No newline at end of file diff --git a/source/includes/_insurance.md b/source/includes/_insurance.md index 60dcf7d0..1c998c5f 100644 --- a/source/includes/_insurance.md +++ b/source/includes/_insurance.md @@ -9,25 +9,24 @@ Includes the messages to create, underwrite and redeem in insurance funds. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -36,67 +35,43 @@ async def main() -> None: # set custom cookie location (optional) - defaults to current dir client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) - msg = composer.MsgCreateInsuranceFund( + msg = composer.msg_create_insurance_fund( sender=address.to_acc_bech32(), ticker="5202d32a9-1701406800-SF", - quote_denom="USDT", + quote_denom="peggy0xdAC17F958D2ee523a2206206994597C13D831ec7", oracle_base="Frontrunner", oracle_quote="Frontrunner", - oracle_type=11, + oracle_type="Band", expiry=-2, initial_deposit=1000, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -126,75 +101,38 @@ gas wanted: 151648 gas fee: 0.000075824 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -205,25 +143,25 @@ gas fee: 0.000075824 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os +from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -232,63 +170,43 @@ async def main() -> None: # set custom cookie location (optional) - defaults to current dir client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) - msg = composer.MsgUnderwrite( + token_decimals = 6 + amount = 100 + chain_amount = Decimal(str(amount)) * Decimal(f"1e{token_decimals}") + + msg = composer.msg_underwrite( sender=address.to_acc_bech32(), market_id="0x141e3c92ed55107067ceb60ee412b86256cedef67b1227d6367b4cdf30c55a74", - quote_denom="USDT", - amount=100, + quote_denom="peggy0xdAC17F958D2ee523a2206206994597C13D831ec7", + amount=int(chain_amount), ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -313,75 +231,38 @@ gas wanted: 142042 gas fee: 0.000071021 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -392,25 +273,24 @@ gas fee: 0.000071021 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -419,63 +299,39 @@ async def main() -> None: # set custom cookie location (optional) - defaults to current dir client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) - msg = composer.MsgRequestRedemption( + msg = composer.msg_request_redemption( sender=address.to_acc_bech32(), market_id="0x141e3c92ed55107067ceb60ee412b86256cedef67b1227d6367b4cdf30c55a74", share_denom="share15", amount=100, # raw chain value ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -501,73 +357,36 @@ gas wanted: 110689 gas fee: 0.0000553445 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_insurancerpc.md b/source/includes/_insurancerpc.md index ee0cda1b..0940e36f 100644 --- a/source/includes/_insurancerpc.md +++ b/source/includes/_insurancerpc.md @@ -11,21 +11,22 @@ List all the insurance funds. > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) insurance_funds = await client.fetch_insurance_funds() - print(insurance_funds) + print(json.dumps(insurance_funds, indent=2)) if __name__ == "__main__": @@ -33,8 +34,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -65,7 +66,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -169,24 +170,25 @@ Get a list of redemptions. If no parameters are provided, redemptions for all po ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) redeemer = "inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku" redemption_denom = "share4" status = "disbursed" insurance_redemptions = await client.fetch_redemptions(address=redeemer, denom=redemption_denom, status=status) - print(insurance_redemptions) + print(json.dumps(insurance_redemptions, indent=2)) if __name__ == "__main__": @@ -194,8 +196,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -226,7 +228,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` diff --git a/source/includes/_metarpc.md b/source/includes/_metarpc.md index ac03e197..ef3b67a9 100644 --- a/source/includes/_metarpc.md +++ b/source/includes/_metarpc.md @@ -10,21 +10,22 @@ Get the server health. > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) resp = await client.fetch_ping() - print("Health OK?", resp) + print(json.dumps(resp, indent=2)) if __name__ == "__main__": @@ -32,8 +33,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -64,7 +65,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -89,21 +90,22 @@ Get the server version. > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) resp = await client.fetch_version() - print("Version:", resp) + print(json.dumps(resp, indent=2)) if __name__ == "__main__": @@ -111,8 +113,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -143,7 +145,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -198,23 +200,24 @@ Get the server information. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import time -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) resp = await client.fetch_info() print("[!] Info:") - print(resp) + print(json.dumps(resp, indent=2)) latency = int(time.time() * 1000) - int(resp["timestamp"]) print(f"Server Latency: {latency}ms") @@ -224,8 +227,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -256,7 +259,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -309,16 +312,16 @@ Subscribe to a stream and gracefully disconnect and connect to another sentry no > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient def stream_error_processor(exception: RpcError): @@ -332,7 +335,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) tasks = [] async def keepalive_event_processor(event: Dict[str, Any]): @@ -373,8 +376,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -412,7 +415,7 @@ func main() { fmt.Println(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } diff --git a/source/includes/_oracle.md b/source/includes/_oracle.md index 23f97693..ccdcc589 100644 --- a/source/includes/_oracle.md +++ b/source/includes/_oracle.md @@ -9,25 +9,24 @@ Includes the message to relay a price feed. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -35,13 +34,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) price = 100 price_to_send = [str(int(price * 10**18))] @@ -49,50 +57,19 @@ async def main() -> None: quote = ["WETH"] # prepare tx msg - msg = composer.MsgRelayPriceFeedPrice(sender=address.to_acc_bech32(), price=price_to_send, base=base, quote=quote) - - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) + msg = composer.msg_relay_price_feed_price( + sender=address.to_acc_bech32(), price=price_to_send, base=base, quote=quote ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -100,27 +77,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "fmt" "os" + "time" "cosmossdk.io/math" - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" txtypes "github.com/cosmos/cosmos-sdk/types/tx" oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -151,7 +130,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -160,7 +139,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -177,7 +159,7 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - _, result, err := chainClient.BroadcastMsg(txtypes.BroadcastMode_BROADCAST_MODE_SYNC, msg) + _, result, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, msg) if err != nil { panic(err) @@ -185,7 +167,7 @@ func main() { fmt.Printf("Broadcast result: %s\n", result) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -219,75 +201,38 @@ DEBU[0002] gas wanted: 113647 fn=func1 src="client/ch gas fee: 0.0000568235 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -298,25 +243,24 @@ gas fee: 0.0000568235 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -324,70 +268,41 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) provider = "ufc" symbols = ["KHABIB-TKO-05/30/2023", "KHABIB-TKO-05/26/2023"] prices = [0.5, 0.8] # prepare tx msg - msg = composer.MsgRelayProviderPrices( + msg = composer.msg_relay_provider_prices( sender=address.to_acc_bech32(), provider=provider, symbols=symbols, prices=prices ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -418,73 +333,36 @@ gas fee: 0.0000863755 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_oraclerpc.md b/source/includes/_oraclerpc.md index 1b4830a8..6fac656e 100644 --- a/source/includes/_oraclerpc.md +++ b/source/includes/_oraclerpc.md @@ -11,21 +11,22 @@ Get a list of all oracles. > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) oracle_list = await client.fetch_oracle_list() - print(oracle_list) + print(json.dumps(oracle_list, indent=2)) if __name__ == "__main__": @@ -33,8 +34,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -60,7 +61,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -173,19 +174,20 @@ Get the oracle price of an asset. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market = (await client.all_derivative_markets())[ "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" ] @@ -199,7 +201,7 @@ async def main() -> None: quote_symbol=quote_symbol, oracle_type=oracle_type, ) - print(oracle_prices) + print(json.dumps(oracle_prices, indent=2)) if __name__ == "__main__": @@ -207,8 +209,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -223,12 +225,13 @@ import ( "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -260,7 +263,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -272,7 +275,7 @@ func main() { } ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) + marketsAssistant, err := chainclient.NewHumanReadableMarketsAssistant(ctx, chainClient) if err != nil { panic(err) } @@ -283,17 +286,21 @@ func main() { } market := marketsAssistant.AllDerivativeMarkets()["0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"] + derivativeMarket, ok := market.(core.DerivativeMarketV2) + if !ok { + panic("market is not a derivative market") + } - baseSymbol := market.OracleBase - quoteSymbol := market.OracleQuote - oracleType := market.OracleType + baseSymbol := derivativeMarket.OracleBase + quoteSymbol := derivativeMarket.OracleQuote + oracleType := derivativeMarket.OracleType oracleScaleFactor := uint32(0) res, err := exchangeClient.GetPrice(ctx, baseSymbol, quoteSymbol, oracleType, oracleScaleFactor) if err != nil { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -335,16 +342,16 @@ Stream new price changes for a specified oracle. If no oracles are provided, all ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def price_event_processor(event: Dict[str, Any]): @@ -362,7 +369,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market = (await client.all_derivative_markets())[ "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" ] @@ -391,8 +398,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -408,12 +415,13 @@ import ( "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -445,7 +453,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -457,21 +465,25 @@ func main() { } ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) + marketsAssistant, err := chainclient.NewHumanReadableMarketsAssistant(ctx, chainClient) if err != nil { panic(err) } market := marketsAssistant.AllDerivativeMarkets()["0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"] + derivativeMarket, ok := market.(core.DerivativeMarketV2) + if !ok { + panic("market is not a derivative market") + } exchangeClient, err := exchangeclient.NewExchangeClient(network) if err != nil { panic(err) } - baseSymbol := market.OracleBase - quoteSymbol := market.OracleQuote - oracleType := strings.ToLower(market.OracleType) + baseSymbol := derivativeMarket.OracleBase + quoteSymbol := derivativeMarket.OracleQuote + oracleType := strings.ToLower(derivativeMarket.OracleType) stream, err := exchangeClient.StreamPrices(ctx, baseSymbol, quoteSymbol, oracleType) if err != nil { @@ -488,7 +500,7 @@ func main() { fmt.Println(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } diff --git a/source/includes/_overview.md b/source/includes/_overview.md index 57de585e..31a765f4 100644 --- a/source/includes/_overview.md +++ b/source/includes/_overview.md @@ -69,7 +69,9 @@ If you are a trader on existing centralized exchanges, you will be familiar with - The gas costs are currently minimal, 20K transactions will cost about 1 INJ. - You can set the fee_recipient to your own wallet address to save 40% of all trading fees. -**Note: trading from bank balances, which automatically uses the default subaccount 0, will cost roughly 15% more gas than trading from other subaccounts. API traders can use other subaccounts to trade to avoid the extra gas fees—read [here](https://injective.notion.site/The-new-trading-logic-to-be-introduced-in-v1-10-8b422f7bec6c4cac96459d558e917b6d) for more information.** + ## Mark Price Margin Requirement diff --git a/source/includes/_permissions.md b/source/includes/_permissions.md index 22cf454a..3cbaeb10 100644 --- a/source/includes/_permissions.md +++ b/source/includes/_permissions.md @@ -12,12 +12,12 @@ Defines a gRPC query method that returns the denoms for which a namespace exists ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -34,8 +34,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -54,7 +54,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -85,7 +85,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -102,7 +102,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -137,12 +137,12 @@ Defines a gRPC query method that returns the permissions module's created namesp ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -159,8 +159,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -179,7 +179,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -210,7 +210,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -227,7 +227,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -657,12 +657,12 @@ Defines a gRPC query method that returns the permissions module's namespace asso ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -680,8 +680,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -700,7 +700,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -731,7 +731,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -750,7 +750,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1179,12 +1179,12 @@ Defines a gRPC query method that returns roles for the actor in the namespace ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1203,8 +1203,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1223,7 +1223,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1254,7 +1254,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1274,7 +1274,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1310,12 +1310,12 @@ Defines a gRPC query method that returns a namespace's roles associated with the ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1334,8 +1334,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1354,7 +1354,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1385,7 +1385,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1405,7 +1405,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1442,12 +1442,12 @@ Defines a gRPC query method that returns a namespace's role managers ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1465,8 +1465,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1484,7 +1484,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1515,7 +1515,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1534,7 +1534,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1599,12 +1599,12 @@ Defines a gRPC query method that returns the roles a given role manager manages ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1623,8 +1623,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1642,7 +1642,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1673,7 +1673,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1693,7 +1693,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1757,12 +1757,12 @@ Defines a gRPC query method that returns a namespace's policy statuses ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1780,8 +1780,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1799,7 +1799,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1830,7 +1830,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1849,7 +1849,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1938,12 +1938,12 @@ Defines a gRPC query method that returns a namespace's policy manager capabiliti ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1961,8 +1961,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1980,7 +1980,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2011,7 +2011,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2030,7 +2030,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2120,12 +2120,12 @@ Defines a gRPC query method for the vouchers for a given denom ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2143,8 +2143,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2163,7 +2163,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2194,7 +2194,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2213,7 +2213,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2248,9 +2248,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
@@ -2263,12 +2263,12 @@ Defines a gRPC query method for the vouchers for a given denom and address ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2287,8 +2287,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2306,7 +2306,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2337,7 +2337,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2357,7 +2357,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2384,9 +2384,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
@@ -2399,12 +2399,12 @@ Retrieves the entire permissions module's state ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -2421,8 +2421,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2441,7 +2441,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2472,7 +2472,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -2489,7 +2489,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -2946,9 +2946,9 @@ No parameters **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
@@ -2962,8 +2962,8 @@ Message to create a new namespace ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -2971,7 +2971,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -3082,25 +3082,28 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" permissionstypes "github.com/InjectiveLabs/sdk-go/chain/permissions/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3131,7 +3134,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3140,7 +3143,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3214,16 +3220,17 @@ func main() { } //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.SyncBroadcastMsg(msg) + pollInterval := 100 * time.Millisecond + response, err := chainClient.SyncBroadcastMsg(ctx, &pollInterval, 5, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3322,75 +3329,38 @@ func main() { ``` json ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -3404,8 +3374,8 @@ Message to update a namespace configuration ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -3413,7 +3383,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -3507,15 +3477,17 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" @@ -3526,7 +3498,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3557,7 +3529,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3566,7 +3538,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3618,16 +3593,17 @@ func main() { } //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.SyncBroadcastMsg(msg) + pollInterval := 100 * time.Millisecond + response, err := chainClient.SyncBroadcastMsg(ctx, &pollInterval, 5, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3716,75 +3692,38 @@ func main() { ``` json ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -3798,8 +3737,8 @@ Message to update the roles assigned to an actor ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -3807,7 +3746,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -3881,27 +3820,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/common" rpchttp "github.com/cometbft/cometbft/rpc/client/http" txtypes "github.com/cosmos/cosmos-sdk/types/tx" permissionstypes "github.com/InjectiveLabs/sdk-go/chain/permissions/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3932,7 +3873,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3941,7 +3882,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3972,16 +3916,16 @@ func main() { } //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - _, response, err := chainClient.BroadcastMsg(txtypes.BroadcastMode_BROADCAST_MODE_SYNC, msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -4012,75 +3956,38 @@ func main() { ``` json ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -4094,8 +4001,8 @@ Message to claim existing vouchers for a particular address ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -4103,7 +4010,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -4158,15 +4065,17 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" txtypes "github.com/cosmos/cosmos-sdk/types/tx" @@ -4178,7 +4087,7 @@ import ( func main() { network := common.LoadNetwork("devnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4209,7 +4118,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -4218,7 +4127,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -4231,16 +4143,16 @@ func main() { } //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - _, response, err := chainClient.BroadcastMsg(txtypes.BroadcastMode_BROADCAST_MODE_SYNC, msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -4259,73 +4171,36 @@ func main() { ``` json ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_portfoliorpc.md b/source/includes/_portfoliorpc.md index 2dfe4a87..f72876b5 100644 --- a/source/includes/_portfoliorpc.md +++ b/source/includes/_portfoliorpc.md @@ -12,22 +12,23 @@ Get details about an account's portfolio. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) account_address = "inj1clw20s2uxeyxtam6f7m84vgae92s9eh7vygagt" portfolio = await client.fetch_account_portfolio_balances(account_address=account_address, usd=False) - print(portfolio) + print(json.dumps(portfolio, indent=2)) if __name__ == "__main__": @@ -35,8 +36,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -64,7 +65,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -291,16 +292,16 @@ Get continuous updates on account's portfolio. ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def account_portfolio_event_processor(event: Dict[str, Any]): @@ -317,7 +318,7 @@ def stream_closed_processor(): async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) account_address = "inj1clw20s2uxeyxtam6f7m84vgae92s9eh7vygagt" task = asyncio.get_event_loop().create_task( @@ -338,8 +339,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -377,7 +378,7 @@ func main() { fmt.Println(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } diff --git a/source/includes/_spot.md b/source/includes/_spot.md index 14b33508..384a6488 100644 --- a/source/includes/_spot.md +++ b/source/includes/_spot.md @@ -11,12 +11,12 @@ Get the level 3 aggregated order book for a spot market ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -38,8 +38,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -47,7 +47,6 @@ import ( "context" "encoding/json" "fmt" - "os" "github.com/InjectiveLabs/sdk-go/client" @@ -58,7 +57,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -89,7 +88,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -103,12 +102,12 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - res, err := chainClient.FetchL3SpotOrderBook(ctx, marketId) + res, err := chainClient.FetchL3SpotOrderbook(ctx, marketId) if err != nil { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -136,8 +135,8 @@ func main() { **TrimmedLimitOrder** - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
+
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
order_hashStringThe order hash
subaccount_idStringSubaccount ID that created the order
@@ -152,12 +151,12 @@ Retrieves a list of spot markets ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -180,8 +179,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -200,7 +199,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -231,7 +230,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -251,7 +250,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -268,22 +267,23 @@ func main() { ``` json { - "markets":[ - { - "ticker":"INJ/USDT", - "baseDenom":"inj", - "quoteDenom":"peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", - "makerFeeRate":"-100000000000000", - "takerFeeRate":"1000000000000000", - "relayerFeeShareRate":"400000000000000000", - "marketId":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", - "status":"Active", - "minPriceTickSize":"1000", - "minQuantityTickSize":"1000000000000000000000000000000000", - "baseDecimals":18, - "quoteDecimals":6, - } - ] + "markets": [ + { + "ticker": "INJ/USDT", + "base_denom": "inj", + "quote_denom": "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", + "maker_fee_rate": "-0.000100000000000000", + "taker_fee_rate": "0.000500000000000000", + "relayer_fee_share_rate": "0.400000000000000000", + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "status": 1, + "min_price_tick_size": "0.001000000000000000", + "min_quantity_tick_size": "0.001000000000000000", + "min_notional": "0.000000000001000000", + "base_decimals": 18, + "quote_decimals": 6 + } + ] } ``` @@ -304,9 +304,9 @@ func main() { relayer_fee_share_rateDecimalPercentage of the transaction fee shared with the relayer in a derivative market market_idStringThe market ID statusMarketStatusStatus of the market -min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market -min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market -min_notionalDecimalMinimum notional (in quote asset) required for orders in the market +min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market (in human redable format) +min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market (in human redable format) +min_notionalDecimalMinimum notional (in quote asset) required for orders in the market (in human redable format) adminStringCurrent market admin's address admin_permissionsIntegerLevel of admin permissions (the permission number is a result of adding up all individual permissions numbers) base_decimalsIntegerNumber of decimals used for the base token @@ -317,7 +317,7 @@ func main() { **MarketStatus** - + @@ -329,7 +329,7 @@ func main() { **AdminPermission** - +
CodeName
0Unspecified
1Active
2Paused
@@ -338,8 +338,45 @@ func main() {
CodeName
1Ticker Permission
2Min Price Tick Size Permission
4Min Quantity Tick Size Permission
32Maintenance Margin Ratio Permission
- - + +## SpotMarket + +Retrieves a spot market by ticker + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + spot_market = await client.fetch_chain_spot_market( + market_id="0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + ) + print(spot_market) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + ```go package main @@ -358,7 +395,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -389,7 +426,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -408,7 +445,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -424,20 +461,21 @@ func main() { ``` json { - "market":{ - "ticker":"INJ/USDT", - "baseDenom":"inj", - "quoteDenom":"peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", - "makerFeeRate":"-100000000000000", - "takerFeeRate":"1000000000000000", - "relayerFeeShareRate":"400000000000000000", - "marketId":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", - "status":"Active", - "minPriceTickSize":"1000", - "minQuantityTickSize":"1000000000000000000000000000000000", - "baseDecimals":18, - "quoteDecimals":6, - } + "market": { + "ticker": "INJ/USDT", + "base_denom": "inj", + "quote_denom": "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", + "maker_fee_rate": "-0.000100000000000000", + "taker_fee_rate": "0.000500000000000000", + "relayer_fee_share_rate": "0.400000000000000000", + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "status": 1, + "min_price_tick_size": "0.001000000000000000", + "min_quantity_tick_size": "0.001000000000000000", + "min_notional": "0.000000000001000000", + "base_decimals": 18, + "quote_decimals": 6 + } } ``` @@ -458,9 +496,9 @@ func main() { relayer_fee_share_rateDecimalPercentage of the transaction fee shared with the relayer in a derivative market market_idStringThe market ID statusMarketStatusStatus of the market -min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market -min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market -min_notionalDecimalMinimum notional (in quote asset) required for orders in the market +min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market (in human redable format) +min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market (in human redable format) +min_notionalDecimalMinimum notional (in quote asset) required for orders in the market (in human redable format) adminStringCurrent market admin's address admin_permissionsIntegerLevel of admin permissions (the permission number is a result of adding up all individual permissions numbers) base_decimalsIntegerNumber of decimals used for the base token @@ -471,7 +509,7 @@ func main() { **MarketStatus** - + @@ -483,7 +521,7 @@ func main() { **AdminPermission** - +
CodeName
0Unspecified
1Active
2Paused
@@ -492,8 +530,47 @@ func main() {
CodeName
1Ticker Permission
2Min Price Tick Size Permission
4Min Quantity Tick Size Permission
32Maintenance Margin Ratio Permission
- - + +## FullSpotMarkets + +Retrieves a list of spot markets with extra information + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + spot_markets = await client.fetch_chain_full_spot_markets( + status="Active", + market_ids=["0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe"], + with_mid_price_and_tob=True, + ) + print(spot_markets) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + ```go package main @@ -512,7 +589,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -543,7 +620,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -564,7 +641,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -582,29 +659,30 @@ func main() { ``` json { - "markets":[ - { - "market":{ - "ticker":"INJ/USDT", - "baseDenom":"inj", - "quoteDenom":"peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", - "makerFeeRate":"-100000000000000", - "takerFeeRate":"1000000000000000", - "relayerFeeShareRate":"400000000000000000", - "marketId":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", - "status":"Active", - "minPriceTickSize":"1000", - "minQuantityTickSize":"1000000000000000000000000000000000", - "baseDecimals":18, - "quoteDecimals":6, - }, - "midPriceAndTob":{ - "midPrice":"42494500", - "bestBuyPrice":"42490000", - "bestSellPrice":"42499000" - } - } - ] + "markets": [ + { + "market": { + "ticker": "INJ/USDT", + "base_denom": "inj", + "quote_denom": "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", + "maker_fee_rate": "-0.000100000000000000", + "taker_fee_rate": "0.000500000000000000", + "relayer_fee_share_rate": "0.400000000000000000", + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "status": 1, + "min_price_tick_size": "0.001000000000000000", + "min_quantity_tick_size": "0.001000000000000000", + "min_notional": "0.000000000001000000", + "base_decimals": 18, + "quote_decimals": 6 + }, + "mid_price_and_tob": { + "mid_price": "29.433500000000000000", + "best_buy_price": "29.414000000000000000", + "best_sell_price": "29.453000000000000000" + } + } + ] } ``` @@ -634,9 +712,9 @@ func main() { relayer_fee_share_rateDecimalPercentage of the transaction fee shared with the relayer in a derivative market market_idStringThe market ID statusMarketStatusStatus of the market -min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market -min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market -min_notionalDecimalMinimum notional (in quote asset) required for orders in the market +min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market (in human redable format) +min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market (in human redable format) +min_notionalDecimalMinimum notional (in quote asset) required for orders in the market (in human redable format) adminStringCurrent market admin's address admin_permissionsIntegerLevel of admin permissions (the permission number is a result of adding up all individual permissions numbers) base_decimalsIntegerNumber of decimals used for the base token @@ -647,7 +725,7 @@ func main() { **MarketStatus** - + @@ -660,16 +738,16 @@ func main() { **MidPriceAndTOB** -
CodeName
0Unspecified
1Active
2Paused
- -
ParameterTypeDescription
mid_priceDecimalMarket's mid price
best_buy_priceDecimalMarket's best buy price
best_sell_priceDecimalMarket's best sell price
+ + +
ParameterTypeDescription
mid_priceDecimalMarket's mid price (in human redable format)
best_buy_priceDecimalMarket's best buy price (in human redable format)
best_sell_priceDecimalMarket's best sell price (in human redable format)

**AdminPermission** - + @@ -678,8 +756,46 @@ func main() {
CodeName
1Ticker Permission
2Min Price Tick Size Permission
4Min Quantity Tick Size Permission
32Maintenance Margin Ratio Permission
- - + +## FullSpotMarket + +Retrieves a spot market with extra information + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.network import Network + + +async def main() -> None: + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + spot_market = await client.fetch_chain_full_spot_market( + market_id="0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + with_mid_price_and_tob=True, + ) + print(spot_market) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + ```go package main @@ -698,7 +814,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -729,7 +845,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -749,7 +865,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -766,27 +882,28 @@ func main() { ``` json { - "market":{ - "market":{ - "ticker":"INJ/USDT", - "baseDenom":"inj", - "quoteDenom":"peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", - "makerFeeRate":"-100000000000000", - "takerFeeRate":"1000000000000000", - "relayerFeeShareRate":"400000000000000000", - "marketId":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", - "status":"Active", - "minPriceTickSize":"1000", - "minQuantityTickSize":"1000000000000000000000000000000000", - "baseDecimals":18, - "quoteDecimals":6, - }, - "midPriceAndTob":{ - "midPrice":"42473500", - "bestBuyPrice":"42336000", - "bestSellPrice":"42611000" - } - } + "market": { + "market": { + "ticker": "INJ/USDT", + "base_denom": "inj", + "quote_denom": "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5", + "maker_fee_rate": "-0.000100000000000000", + "taker_fee_rate": "0.000500000000000000", + "relayer_fee_share_rate": "0.400000000000000000", + "market_id": "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + "status": 1, + "min_price_tick_size": "0.001000000000000000", + "min_quantity_tick_size": "0.001000000000000000", + "min_notional": "0.000000000001000000", + "base_decimals": 18, + "quote_decimals": 6 + }, + "mid_price_and_tob": { + "mid_price": "29.433500000000000000", + "best_buy_price": "29.414000000000000000", + "best_sell_price": "29.453000000000000000" + } + } } ``` @@ -816,9 +933,9 @@ func main() { relayer_fee_share_rateDecimalPercentage of the transaction fee shared with the relayer in a derivative market market_idStringThe market ID statusMarketStatusStatus of the market -min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market -min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market -min_notionalDecimalMinimum notional (in quote asset) required for orders in the market +min_price_tick_sizeDecimalMinimum tick size that the price required for orders in the market (in human redable format) +min_quantity_tick_sizeDecimalMinimum tick size of the quantity required for orders in the market (in human redable format) +min_notionalDecimalMinimum notional (in quote asset) required for orders in the market (in human redable format) adminStringCurrent market admin's address admin_permissionsIntegerLevel of admin permissions (the permission number is a result of adding up all individual permissions numbers) base_decimalsIntegerNumber of decimals used for the base token @@ -829,7 +946,7 @@ func main() { **MarketStatus** - + @@ -842,16 +959,16 @@ func main() { **MidPriceAndTOB** -
CodeName
0Unspecified
1Active
2Paused
- -
ParameterTypeDescription
mid_priceDecimalMarket's mid price
best_buy_priceDecimalMarket's best buy price
best_sell_priceDecimalMarket's best sell price
+ + +
ParameterTypeDescription
mid_priceDecimalMarket's mid price (in human redable format)
best_buy_priceDecimalMarket's best buy price (in human redable format)
best_sell_priceDecimalMarket's best sell price (in human redable format)

**AdminPermission** - + @@ -860,8 +977,50 @@ func main() {
CodeName
1Ticker Permission
2Min Price Tick Size Permission
4Min Quantity Tick Size Permission
32Maintenance Margin Ratio Permission
- - + +## SpotOrderBook + +Retrieves a spot market's orderbook by marketID + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.client.model.pagination import PaginationOption +from pyinjective.core.network import Network + + +async def main() -> None: + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + + pagination = PaginationOption(limit=2) + + orderbook = await client.fetch_chain_spot_orderbook( + market_id="0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", + order_side="Buy", + pagination=pagination, + ) + print(orderbook) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + ```go package main @@ -869,22 +1028,20 @@ import ( "context" "encoding/json" "fmt" - - "cosmossdk.io/math" - "os" - "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + v2 "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -915,7 +1072,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -929,7 +1086,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" limit := uint64(2) - orderSide := types.OrderSide_Buy + orderSide := v2.OrderSide_Buy limitCumulativeNotional := math.LegacyDec{} limitCumulativeQuantity := math.LegacyDec{} @@ -938,7 +1095,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -949,8 +1106,8 @@ func main() { - -
ParameterTypeDescriptionRequired
market_idStringMarket ID to request forYes
limitIntegerMax number of order book entries to return per sideNo
order_sideOrderSideSpecifies the side of the order book to return entries fromNo
limit_cumulative_notionalDecimalLimit the number of entries to return per side based on the cumulative notionalNo
limit_cumulative_quantityDecimalLimit the number of entries to return per side based on the cumulative quantityNo
+limit_cumulative_notionalDecimalLimit the number of entries to return per side based on the cumulative notional (in human redable format)No +limit_cumulative_quantityDecimalLimit the number of entries to return per side based on the cumulative quantity (in human redable format)No
@@ -968,19 +1125,17 @@ func main() { ``` json { - "buysPriceLevel":[ - { - "p":"43260000", - "q":"142000000000000000000000000000000000000" - }, - { - "p":"43208000", - "q":"25554192000000000000000000000000000000000" - } - ], - "sellsPriceLevel":[ - - ] + "buysPriceLevel": [ + { + "p": "29.414", + "q": "27.651" + }, + { + "p": "29.394", + "q": "27.714" + } + ], + "sellsPriceLevel": [] } ``` @@ -994,8 +1149,8 @@ func main() { **Level** - -
ParameterTypeDescription
pDecimalPrice
qDecimalQuantity
+ +
ParameterTypeDescription
pDecimalPrice (in human redable format)
qDecimalQuantity (in human redable format)
@@ -1008,8 +1163,8 @@ Retrieves a trader's spot orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1017,7 +1172,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1051,8 +1206,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1070,7 +1225,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1101,7 +1256,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1121,7 +1276,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1138,36 +1293,15 @@ func main() { ``` json { - "orders":[ - { - "price":"7523000", - "quantity":"10000000000000000000000000000000000", - "fillable":"10000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0xee405938e1924d20cce9d91e47476af0b40774843906b653ba4c439654fb9a8b" - }, - { - "price":"3000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"55000000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0x57a01cd26f1e2080860af3264e865d7c9c034a701e30946d01c1dc7a303cf2c1" - }, - { - "price":"3000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"55000000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0x079d65de81f03229d0fac69fb8ee0bfe0f043783099ad4cb28f1b30115736a02" - }, - { - "price":"300000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"22458000000000000000000000000000000000", - "orderHash":"0x6e53d070e13be855d230de48849017b2390c2294afc3681bd3624370d153a7cc", - "isBuy":false - } - ] + "orders": [ + { + "price": "21.000000000000000000", + "quantity": "2.000000000000000000", + "fillable": "2.000000000000000000", + "isBuy": true, + "order_hash": "0x4a547afd5fbe957223afdce1eef3a11a3e09be114310323b510dcc79dc18aca7" + } + ] } ``` @@ -1180,9 +1314,9 @@ func main() { **TrimmedSpotLimitOrder** - - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
fillableDecimalThe remaining fillable amount of the order
+ +
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
fillableDecimalThe remaining fillable amount of the order (in human redable format)
is_buyBooleanTrue if the order is a buy order
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
@@ -1198,8 +1332,8 @@ Retrieves all account address spot orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1207,7 +1341,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1239,8 +1373,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1258,7 +1392,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1289,7 +1423,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1308,7 +1442,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1325,57 +1459,15 @@ func main() { ``` json { - "orders":[ - { - "price":"3000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"55000000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0xda7a606d542962da77f13b0f8373c24ce4511e421de8e4602a3e5f2b85b7623c" - }, - { - "price":"3000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"55000000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0x9c7c77da10b73d63c72875a175c4a7cb7313dbbeb9a3380bc1bf930cce883b1b" - }, - { - "price":"7523000", - "quantity":"10000000000000000000000000000000000", - "fillable":"10000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0xee405938e1924d20cce9d91e47476af0b40774843906b653ba4c439654fb9a8b" - }, - { - "price":"3000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"55000000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0x57a01cd26f1e2080860af3264e865d7c9c034a701e30946d01c1dc7a303cf2c1" - }, - { - "price":"3000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"55000000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0x079d65de81f03229d0fac69fb8ee0bfe0f043783099ad4cb28f1b30115736a02" - }, - { - "price":"300000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"22458000000000000000000000000000000000", - "orderHash":"0x6e53d070e13be855d230de48849017b2390c2294afc3681bd3624370d153a7cc", - "isBuy":false - }, - { - "price":"300000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"55000000000000000000000000000000000000", - "orderHash":"0xcb38413ecf5517faac19a4753726813b68374525d70e8ca3058bb20504a98e10", - "isBuy":false - } - ] + "orders": [ + { + "price": "21.000000000000000000", + "quantity": "2.000000000000000000", + "fillable": "2.000000000000000000", + "isBuy": true, + "order_hash": "0x4a547afd5fbe957223afdce1eef3a11a3e09be114310323b510dcc79dc18aca7" + } + ] } ``` @@ -1388,9 +1480,9 @@ func main() { **TrimmedSpotLimitOrder** - - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
fillableDecimalThe remaining fillable amount of the order
+ +
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
fillableDecimalThe remaining fillable amount of the order (in human redable format)
is_buyBooleanTrue if the order is a buy order
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
@@ -1406,8 +1498,8 @@ Retrieves spot orders corresponding to specified order hashes for a given subacc ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1415,7 +1507,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1450,8 +1542,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1469,7 +1561,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1500,7 +1592,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1521,7 +1613,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1539,15 +1631,15 @@ func main() { ``` json { - "orders":[ - { - "price":"3000000", - "quantity":"55000000000000000000000000000000000000", - "fillable":"55000000000000000000000000000000000000", - "isBuy":true, - "orderHash":"0x57a01cd26f1e2080860af3264e865d7c9c034a701e30946d01c1dc7a303cf2c1" - } - ] + "orders": [ + { + "price": "21.000000000000000000", + "quantity": "2.000000000000000000", + "fillable": "2.000000000000000000", + "isBuy": true, + "order_hash": "0x57a01cd26f1e2080860af3264e865d7c9c034a701e30946d01c1dc7a303cf2c1" + } + ] } ``` @@ -1560,9 +1652,9 @@ func main() { **TrimmedSpotLimitOrder** - - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
fillableDecimalThe remaining fillable amount of the order
+ +
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
fillableDecimalThe remaining fillable amount of the order (in human redable format)
is_buyBooleanTrue if the order is a buy order
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
@@ -1578,8 +1670,8 @@ Retrieves a trader's transient spot orders ### Request Parameters > Request Example: - - + + ```py import asyncio import os @@ -1587,7 +1679,7 @@ import os import dotenv from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1621,8 +1713,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1640,7 +1732,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1671,7 +1763,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1691,7 +1783,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1708,9 +1800,15 @@ func main() { ``` json { - "orders":[ - - ] + "orders": [ + { + "price": "21.000000000000000000", + "quantity": "2.000000000000000000", + "fillable": "2.000000000000000000", + "isBuy": true, + "order_hash": "0x57a01cd26f1e2080860af3264e865d7c9c034a701e30946d01c1dc7a303cf2c1" + } + ] } ``` @@ -1723,9 +1821,9 @@ func main() { **TrimmedSpotLimitOrder** - - - +
ParameterTypeDescription
priceDecimalOrder price
quantityDecimalOrder quantity
fillableDecimalThe remaining fillable amount of the order
+ +
ParameterTypeDescription
priceDecimalOrder price (in human redable format)
quantityDecimalOrder quantity (in human redable format)
fillableDecimalThe remaining fillable amount of the order (in human redable format)
is_buyBooleanTrue if the order is a buy order
order_hashStringThe order hash
cidStringThe client order ID provided by the creator
@@ -1741,12 +1839,12 @@ Retrieves a spot market's mid-price ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1768,8 +1866,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1787,7 +1885,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1818,7 +1916,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1837,7 +1935,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1853,16 +1951,16 @@ func main() { ``` json { - "midPrice":"44723500", - "bestBuyPrice":"44538000", - "bestSellPrice":"44909000" + "midPrice": "29.4335", + "bestBuyPrice": "29.414", + "bestSellPrice": "29.453" } ``` - - -
ParameterTypeDescription
mid_priceDecimalMarket's mid price
best_buy_priceDecimalMarket's bet bid price
best_sell_priceDecimalMarket's bet ask price
+ + +
ParameterTypeDescription
mid_priceDecimalMarket's mid price (in human redable format)
best_buy_priceDecimalMarket's bet bid price (in human redable format)
best_sell_priceDecimalMarket's bet ask price (in human redable format)
@@ -1873,8 +1971,8 @@ func main() { ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -1883,7 +1981,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -1923,8 +2021,8 @@ async def main() -> None: message = composer.msg_instant_spot_market_launch( sender=address.to_acc_bech32(), ticker="INJ/USDC", - base_denom="INJ", - quote_denom="USDC", + base_denom="inj", + quote_denom="factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc", min_price_tick_size=Decimal("0.001"), min_quantity_tick_size=Decimal("0.01"), min_notional=Decimal("1"), @@ -1948,27 +2046,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1999,7 +2099,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -2007,7 +2107,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -2016,35 +2119,29 @@ func main() { minQuantityTickSize := math.LegacyMustNewDecFromStr("0.001") minNotional := math.LegacyMustNewDecFromStr("1") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - chainMinPriceTickSize = chainMinPriceTickSize.Quo(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(18))) - - chainMinQuantityTickSize := minQuantityTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(18))) - chainMinNotional := minNotional.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - - msg := &exchangetypes.MsgInstantSpotMarketLaunch{ + msg := &exchangev2types.MsgInstantSpotMarketLaunch{ Sender: senderAddress.String(), Ticker: "INJ/USDC", BaseDenom: "inj", QuoteDenom: "factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc", - MinPriceTickSize: chainMinPriceTickSize, - MinQuantityTickSize: chainMinQuantityTickSize, - MinNotional: chainMinNotional, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, + MinNotional: minNotional, BaseDecimals: 18, QuoteDecimals: 6, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -2052,16 +2149,16 @@ func main() { ``` - - - - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe market launch requestor addressYes
tickerStringTicker for the spot marketYes
base_denomStringBase tocken denomYes
quote_denomStringQuote tocken denomYes
min_price_tick_sizeDecimalDefines the minimum tick size of the order's priceYes
min_quantity_tick_sizeDecimalDefines the minimum tick size of the order's quantityYes
min_notionalDecimalDefines the minimum notional (in quote asset) required for orders in the marketYes
base_decimalsIntegerBase token decimalsYes
quote_decimalsIntegerQuote token decimalsYes
+ + + + + + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
tickerstringTicker for the spot market.Yes
base_denomstringtype of coin to use as the base currencyYes
quote_denomstringtype of coin to use as the quote currencyYes
min_price_tick_sizecosmossdk_io_math.LegacyDecmin_price_tick_size defines the minimum tick size of the order's price (in human readable format)Yes
min_quantity_tick_sizecosmossdk_io_math.LegacyDecmin_quantity_tick_size defines the minimum tick size of the order's quantity (in human readable format)Yes
min_notionalcosmossdk_io_math.LegacyDecmin_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)Yes
base_decimalsuint32base token decimalsYes
quote_decimalsuint32quote token decimalsYes
### Response Parameters @@ -2071,75 +2168,38 @@ func main() { ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -2151,21 +2211,20 @@ func main() { ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -2179,7 +2238,18 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_simulation( + network=network, + private_key=configured_private_key, + gas_price=gas_price, + client=client, + composer=composer, + ) # load account priv_key = PrivateKey.from_hex(configured_private_key) @@ -2205,54 +2275,15 @@ async def main() -> None: cid=cid, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) - print(f"\n\ncid: {cid}") + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -2260,29 +2291,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { - network := common.LoadNetwork("mainnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2312,7 +2345,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -2321,78 +2354,49 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) - marketId := "0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0" + marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" amount := decimal.NewFromFloat(2) price := decimal.NewFromFloat(22.55) - order := chainClient.CreateSpotOrder( + order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: int32(exchangev2types.OrderType_BUY), //BUY SELL BUY_PO SELL_PO Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateSpotLimitOrder) - msg.Sender = senderAddress.String() - msg.Order = exchangetypes.SpotOrder(*order) - - simRes, err := chainClient.SimulateMsg(clientCtx, msg) - - if err != nil { - fmt.Println(err) - return - } - - msgCreateSpotLimitOrderResponse := exchangetypes.MsgCreateSpotLimitOrderResponse{} - err = msgCreateSpotLimitOrderResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) - - if err != nil { - fmt.Println(err) - return + msg := exchangev2types.MsgCreateSpotLimitOrder{ + Sender: senderAddress.String(), + Order: *order, } - fmt.Println("simulated order hash: ", msgCreateSpotLimitOrderResponse.OrderHash) - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - return - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -2400,39 +2404,40 @@ func main() { ``` - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
orderSpotOrderOrder's parametersYes
+ + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
orderSpotOrderthe order detailsYes

**SpotOrder** - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -2470,107 +2475,69 @@ DEBU[0003] gas wanted: 129912 fn=func1 src="client/ch gas fee: 0.000064956 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
-
- -**Event** - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- +## MsgCreateSpotMarketOrder -
+**IP rate limit group:** `chain` -**StringEvent** - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- +### Request Parameters +> Request Example: -
+ + +```py +import asyncio +import json +import os +import uuid +from decimal import Decimal -**EventAttribute** +import dotenv - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
- - - -## MsgCreateSpotMarketOrder - -**IP rate limit group:** `chain` - - -### Request Parameters -> Request Example: - - - -```py -import asyncio -import os -import uuid -from decimal import Decimal - -import dotenv -from grpc import RpcError - -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -2578,13 +2545,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -2603,53 +2579,15 @@ async def main() -> None: cid=str(uuid.uuid4()), ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -2657,29 +2595,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2710,7 +2650,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -2719,76 +2659,48 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) marketId := "0x0511ddc4e6586f3bfe1acb2dd905f8b8a82c97e1edaef654b12ca7e6031ca0fa" amount := decimal.NewFromFloat(0.1) price := decimal.NewFromFloat(22) - order := chainClient.CreateSpotOrder( + order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_SELL, //BUY SELL + OrderType: int32(exchangev2types.OrderType_SELL), //BUY SELL Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateSpotMarketOrder) - msg.Sender = senderAddress.String() - msg.Order = exchangetypes.SpotOrder(*order) - - simRes, err := chainClient.SimulateMsg(clientCtx, msg) - if err != nil { - fmt.Println(err) - return - } - - msgCreateSpotMarketOrderResponse := exchangetypes.MsgCreateSpotMarketOrderResponse{} - err = msgCreateSpotMarketOrderResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) - - if err != nil { - fmt.Println(err) - return + msg := exchangev2types.MsgCreateSpotMarketOrder{ + Sender: senderAddress.String(), + Order: *order, } - fmt.Println("simulated order hash", msgCreateSpotMarketOrderResponse.OrderHash) - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -2796,39 +2708,40 @@ func main() { ``` - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
orderSpotOrderOrder's parametersYes
+ + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
orderSpotOrderthe order detailsYes

**SpotOrder** - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -2866,75 +2779,38 @@ DEBU[0004] gas wanted: 130596 fn=func1 src="client/ch gas fee: 0.000065298 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -2945,25 +2821,24 @@ gas fee: 0.000065298 INJ ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -2971,13 +2846,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -2989,48 +2873,15 @@ async def main() -> None: sender=address.to_acc_bech32(), market_id=market_id, subaccount_id=subaccount_id, order_hash=order_hash ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -3038,26 +2889,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3088,7 +2942,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3097,12 +2951,15 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := &exchangetypes.MsgCancelSpotOrder{ + msg := exchangev2types.MsgCancelSpotOrder{ Sender: senderAddress.String(), MarketId: "0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0", SubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", @@ -3110,24 +2967,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3162,75 +3011,38 @@ DEBU[0002] gas wanted: 127363 fn=func1 src="client/ch gas fee: 0.0000636815 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -3248,27 +3060,26 @@ Further note that if no marketIDs are provided in the SpotMarketIdsToCancelAll o ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -3276,13 +3087,22 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) subaccount_id = address.get_subaccount_id(index=0) # prepare trade info @@ -3297,12 +3117,12 @@ async def main() -> None: spot_market_id_cancel_2 = "0x7a57e705bb4e09c88aecfc295569481dbf2fe1d5efe364651fbe72385938e9b0" derivative_orders_to_cancel = [ - composer.order_data( + composer.create_order_data_without_mask( market_id=derivative_market_id_cancel, subaccount_id=subaccount_id, order_hash="0x48690013c382d5dbaff9989db04629a16a5818d7524e027d517ccc89fd068103", ), - composer.order_data( + composer.create_order_data_without_mask( market_id=derivative_market_id_cancel_2, subaccount_id=subaccount_id, order_hash="0x7ee76255d7ca763c56b0eab9828fca89fdd3739645501c8a80f58b62b4f76da5", @@ -3310,12 +3130,12 @@ async def main() -> None: ] spot_orders_to_cancel = [ - composer.order_data( + composer.create_order_data_without_mask( market_id=spot_market_id_cancel, subaccount_id=subaccount_id, cid="0e5c3ad5-2cc4-4a2a-bbe5-b12697739163", ), - composer.order_data( + composer.create_order_data_without_mask( market_id=spot_market_id_cancel_2, subaccount_id=subaccount_id, order_hash="0x222daa22f60fe9f075ed0ca583459e121c23e64431c3fbffdedda04598ede0d2", @@ -3379,53 +3199,15 @@ async def main() -> None: spot_orders_to_cancel=spot_orders_to_cancel, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - sim_res_msg = sim_res["result"]["msgResponses"] - print("---Simulation Response---") - print(sim_res_msg) - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print("---Transaction Response---") - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -3433,29 +3215,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3487,7 +3271,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3497,17 +3281,14 @@ func main() { return } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) smarketId := "0x0511ddc4e6586f3bfe1acb2dd905f8b8a82c97e1edaef654b12ca7e6031ca0fa" @@ -3515,17 +3296,16 @@ func main() { sprice := decimal.NewFromFloat(22.5) smarketIds := []string{"0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0"} - spot_order := chainClient.CreateSpotOrder( + spot_order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: int32(exchangev2types.OrderType_BUY), //BUY SELL BUY_PO SELL_PO Quantity: samount, Price: sprice, FeeRecipient: senderAddress.String(), MarketId: smarketId, Cid: uuid.NewString(), }, - marketsAssistant, ) dmarketId := "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce" @@ -3534,10 +3314,10 @@ func main() { dleverage := decimal.RequireFromString("2") dmarketIds := []string{"0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce"} - derivative_order := chainClient.CreateDerivativeOrder( + derivative_order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: int32(exchangev2types.OrderType_BUY), //BUY SELL BUY_PO SELL_PO Quantity: damount, Price: dprice, Leverage: dleverage, @@ -3546,51 +3326,28 @@ func main() { IsReduceOnly: false, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgBatchUpdateOrders) - msg.Sender = senderAddress.String() - msg.SubaccountId = defaultSubaccountID.Hex() - msg.SpotOrdersToCreate = []*exchangetypes.SpotOrder{spot_order} - msg.DerivativeOrdersToCreate = []*exchangetypes.DerivativeOrder{derivative_order} - msg.SpotMarketIdsToCancelAll = smarketIds - msg.DerivativeMarketIdsToCancelAll = dmarketIds - - simRes, err := chainClient.SimulateMsg(clientCtx, msg) - - if err != nil { - fmt.Println(err) - return + msg := exchangev2types.MsgBatchUpdateOrders{ + Sender: senderAddress.String(), + SubaccountId: defaultSubaccountID.Hex(), + SpotOrdersToCreate: []*exchangev2types.SpotOrder{spot_order}, + DerivativeOrdersToCreate: []*exchangev2types.DerivativeOrder{derivative_order}, + SpotMarketIdsToCancelAll: smarketIds, + DerivativeMarketIdsToCancelAll: dmarketIds, } - MsgBatchUpdateOrdersResponse := exchangetypes.MsgBatchUpdateOrdersResponse{} - MsgBatchUpdateOrdersResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) - - fmt.Println("simulated spot order hashes", MsgBatchUpdateOrdersResponse.SpotOrderHashes) - - fmt.Println("simulated derivative order hashes", MsgBatchUpdateOrdersResponse.DerivativeOrderHashes) - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) - return - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3598,87 +3355,89 @@ func main() { ``` - - - - - - - - - - - -
ParameterTypeDescriptionRequired
senderStringThe message sender's addressYes
subaccount_idStringThe subaccount ID is only used for the spot_market_ids_to_cancel_all and derivative_market_ids_to_cancel_allNo
spot_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
derivative_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
spot_orders_to_cancelOrderData ArrayList of spot orders to be cancelledNo
derivative_orders_to_cancelOrderData ArrayList of derivative orders to be cancelledNo
spot_orders_to_createSpotOrder ArrayList of spot orders to be createdNo
derivative_orders_to_createDerivativeOrder ArrayList of derivative orders to be createdNo
binary_options_orders_to_cancelOrderData ArrayList of binary options orders to be cancelledNo
binary_options_market_ids_to_cancel_allString ArrayList of unique market IDs to cancel all subaccount_id ordersNo
binary_options_orders_to_createDerivativeOrder ArrayList of binary options orders to be createdNo
+ + + + + + + + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
subaccount_idstringsubaccount_id only used for the spot_market_ids_to_cancel_all and derivative_market_ids_to_cancel_all (optional)No
spot_market_ids_to_cancel_allstring arraythe market IDs to cancel all spot orders for (optional)No
derivative_market_ids_to_cancel_allstring arraythe market IDs to cancel all derivative orders for (optional)No
spot_orders_to_cancelOrderData arraythe spot orders to cancelNo
derivative_orders_to_cancelOrderData arraythe derivative orders to cancelNo
spot_orders_to_createSpotOrder arraythe spot orders to createNo
derivative_orders_to_createDerivativeOrder arraythe derivative orders to createNo
binary_options_orders_to_cancelOrderData arraythe binary options orders to cancelNo
binary_options_market_ids_to_cancel_allstring arraythe market IDs to cancel all binary options orders for (optional)No
binary_options_orders_to_createDerivativeOrder arraythe binary options orders to createNo

**OrderData** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe order's market IDYes
subaccount_idStringSubaccount ID that created the orderYes
order_hashStringThe order hash (either the order_hash or the cid should be provided)No
order_maskOrderMaskThe order mask that specifies the order typeNo
cidStringThe order's client order ID (either the order_hash or the cid should be provided)No
+ + + + + +
ParameterTypeDescription
market_idstringthe market ID
subaccount_idstringthe subaccount ID
order_hashstringthe order hash (optional - either the order_hash or the cid should be provided)
order_maskint32the order mask (bitwise combination of OrderMask enum values)
cidstringthe client order ID (optional - either the order_hash or the cid should be provided)

**SpotOrder** - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**DerivativeOrder** - - - - - -
ParameterTypeDescriptionRequired
market_idStringThe unique ID of the marketYes
order_infoOrderInfoOrder's informationYes
order_typeOrderTypeThe order typeYes
marginDecimalThe margin amount used by the orderYes
trigger_priceDecimalThe trigger price used by stop/take ordersNo
+ + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
margincosmossdk_io_math.LegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_pricecosmossdk_io_math.LegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire

**OrderMask** - - - - - - - - -
CodeName
0OrderMask_UNUSED
1OrderMask_ANY
2OrderMask_REGULAR
4OrderMask_CONDITIONAL
8OrderMask_BUY_OR_HIGHER
16OrderMask_SELL_OR_LOWER
32OrderMask_MARKET
64OrderMask_LIMIT
+ + + + + + + + +
CodeName
0UNUSED
1ANY
2REGULAR
4CONDITIONAL
8DIRECTION_BUY_OR_HIGHER
16DIRECTION_SELL_OR_LOWER
32TYPE_MARKET
64TYPE_LIMIT

**OrderInfo** - - - - - -
ParameterTypeDescriptionRequired
subaccount_idStringSubaccount ID that created the orderYes
fee_recipientStringAddress that will receive fees for the orderNo
priceDecimalPrice of the orderYes
quantityDecimalQuantity of the orderYes
cidStringClient order ID. An optional identifier for the order set by the creatorNo
+ + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
pricecosmossdk_io_math.LegacyDecprice of the order (in human readable format)
quantitycosmossdk_io_math.LegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)

**OrderType** - + @@ -3724,75 +3483,38 @@ DEBU[0003] gas wanted: 659092 fn=func1 src="client/ch gas fee: 0.000329546 INJ ``` - -
CodeName
0UNSPECIFIED
1BUY
2SELL
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -3806,8 +3528,8 @@ Modifies certain market fields. It can only be sent by the market's admin. ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -3816,7 +3538,7 @@ from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -3878,27 +3600,29 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -3929,7 +3653,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -3937,7 +3661,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3946,32 +3673,26 @@ func main() { minQuantityTickSize := math.LegacyMustNewDecFromStr("0.01") minNotional := math.LegacyMustNewDecFromStr("2") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - chainMinPriceTickSize = chainMinPriceTickSize.Quo(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(18))) - - chainMinQuantityTickSize := minQuantityTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(18))) - chainMinNotional := minNotional.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(6))) - - msg := &exchangetypes.MsgUpdateSpotMarket{ + msg := &exchangev2types.MsgUpdateSpotMarket{ Admin: senderAddress.String(), MarketId: "0x215970bfdea5c94d8e964a759d3ce6eae1d113900129cc8428267db5ccdb3d1a", NewTicker: "INJ/USDC 2", - NewMinPriceTickSize: chainMinPriceTickSize, - NewMinQuantityTickSize: chainMinQuantityTickSize, - NewMinNotional: chainMinNotional, + NewMinPriceTickSize: minPriceTickSize, + NewMinQuantityTickSize: minQuantityTickSize, + NewMinNotional: minNotional, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -3979,13 +3700,13 @@ func main() { ``` - - - - - - -
ParameterTypeDescriptionRequired
adminStringThe market's admin address (has to be the message broadcaster)Yes
market_idStringThe market's unique IDYes
new_tickerStringNew ticker for the spot marketNo
new_min_price_tick_sizeDecimalDefines the minimum tick size of the order's priceNo
new_min_quantity_tick_sizeDecimalDefines the minimum tick size of the order's quantityNo
new_min_notionalDecimalDefines the minimum notional (in quote asset) required for orders in the marketNo
+ + + + + + +
ParameterTypeDescriptionRequired
adminstringcurrent admin address of the associated marketYes
market_idstringid of the market to be updatedYes
new_tickerstring(optional) updated ticker valueNo
new_min_price_tick_sizecosmossdk_io_math.LegacyDec(optional) updated min price tick size value (in human readable format)No
new_min_quantity_tick_sizecosmossdk_io_math.LegacyDec(optional) updated min quantity tick size value (in human readable format)No
new_min_notionalcosmossdk_io_math.LegacyDec(optional) updated min notional (in human readable format)No
### Response Parameters @@ -4008,75 +3729,38 @@ DEBU[0002] gas wanted: 133614 fn=func1 src="client/ch gas fee: 0.000066807 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -4089,17 +3773,18 @@ This function computes order hashes locally for SpotOrder and DerivativeOrder. F ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import uuid from decimal import Decimal import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT from pyinjective.core.network import Network from pyinjective.orderhash import OrderHashManager @@ -4226,7 +3911,7 @@ async def main() -> None: # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) + print(json.dumps(res, indent=2)) print("gas wanted: {}".format(gas_limit)) print("gas fee: {} INJ".format(gas_fee)) @@ -4267,7 +3952,7 @@ async def main() -> None: # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) + print(json.dumps(res, indent=2)) print("gas wanted: {}".format(gas_limit)) print("gas fee: {} INJ".format(gas_fee)) @@ -4363,7 +4048,7 @@ async def main() -> None: # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) + print(json.dumps(res, indent=2)) print("gas wanted: {}".format(gas_limit)) print("gas fee: {} INJ".format(gas_fee)) @@ -4373,29 +4058,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -4426,7 +4113,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -4435,37 +4122,33 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistant(ctx, chainClient) - if err != nil { - panic(err) - } - // prepare tx msg defaultSubaccountID := chainClient.Subaccount(senderAddress, 1) - spotOrder := chainClient.CreateSpotOrder( + spotOrder := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, + OrderType: int32(exchangev2types.OrderType_BUY), Quantity: decimal.NewFromFloat(2), Price: decimal.NewFromFloat(22.55), FeeRecipient: senderAddress.String(), MarketId: "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", Cid: uuid.NewString(), }, - marketsAssistant, ) - derivativeOrder := chainClient.CreateDerivativeOrder( + derivativeOrder := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, + OrderType: int32(exchangev2types.OrderType_BUY), Quantity: decimal.NewFromFloat(2), Price: decimal.RequireFromString("31"), Leverage: decimal.RequireFromString("2.5"), @@ -4473,16 +4156,17 @@ func main() { MarketId: "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgBatchCreateSpotLimitOrders) - msg.Sender = senderAddress.String() - msg.Orders = []exchangetypes.SpotOrder{*spotOrder} + msg := exchangev2types.MsgBatchCreateSpotLimitOrders{ + Sender: senderAddress.String(), + Orders: []exchangev2types.SpotOrder{*spotOrder}, + } - msg1 := new(exchangetypes.MsgBatchCreateDerivativeLimitOrders) - msg1.Sender = senderAddress.String() - msg1.Orders = []exchangetypes.DerivativeOrder{*derivativeOrder, *derivativeOrder} + msg1 := exchangev2types.MsgBatchCreateDerivativeLimitOrders{ + Sender: senderAddress.String(), + Orders: []exchangev2types.DerivativeOrder{*derivativeOrder}, + } // compute local order hashes orderHashes, err := chainClient.ComputeOrderHashes(msg.Orders, msg1.Orders, defaultSubaccountID) @@ -4495,24 +4179,16 @@ func main() { fmt.Println("computed derivative order hashes: ", orderHashes.Derivative) // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg, msg1) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg, &msg1) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) diff --git a/source/includes/_spotrpc.md b/source/includes/_spotrpc.md index 871b1376..6a1fc5ba 100644 --- a/source/includes/_spotrpc.md +++ b/source/includes/_spotrpc.md @@ -12,21 +12,22 @@ Get details of a single spot market. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_id = "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" market = await client.fetch_spot_market(market_id=market_id) - print(market) + print(json.dumps(market, indent=2)) if __name__ == "__main__": @@ -34,8 +35,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -63,7 +64,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -181,25 +182,26 @@ Get a list of spot markets. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_status = "active" base_denom = "inj" quote_denom = "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5" market = await client.fetch_spot_markets( market_statuses=[market_status], base_denom=base_denom, quote_denom=quote_denom ) - print(market) + print(json.dumps(market, indent=2)) if __name__ == "__main__": @@ -207,8 +209,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -244,7 +246,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -390,16 +392,16 @@ Stream live updates of spot markets. ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def market_event_processor(event: Dict[str, Any]): @@ -417,7 +419,7 @@ def stream_closed_processor(): async def main() -> None: # select network: local, testnet, mainnet network = Network.mainnet() - client = AsyncClient(network) + client = IndexerClient(network) task = asyncio.get_event_loop().create_task( client.listen_spot_markets_updates( @@ -436,8 +438,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -475,7 +477,7 @@ func main() { fmt.Println(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -608,19 +610,20 @@ List history of orders (all states) for a spot market. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = ["0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe"] subaccount_id = "0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000" skip = 10 @@ -633,7 +636,7 @@ async def main() -> None: order_types=order_types, pagination=pagination, ) - print(orders) + print(json.dumps(orders, indent=2)) if __name__ == "__main__": @@ -641,8 +644,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -683,7 +686,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -981,16 +984,16 @@ Stream order updates for spot markets. If no parameters are given, updates to al ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def order_event_processor(event: Dict[str, Any]): @@ -1007,7 +1010,7 @@ def stream_closed_processor(): async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_id = "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" order_direction = "buy" @@ -1030,8 +1033,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1077,7 +1080,7 @@ func main() { panic(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -1212,18 +1215,19 @@ Get trade history for a spot market. The default request returns all spot trades ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = ["0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe"] execution_side = "taker" direction = "buy" @@ -1236,7 +1240,7 @@ async def main() -> None: direction=direction, execution_types=execution_types, ) - print(orders) + print(json.dumps(orders, indent=2)) if __name__ == "__main__": @@ -1244,8 +1248,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1280,7 +1284,7 @@ func main() { panic(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1565,16 +1569,16 @@ Stream newly executed trades of spot markets. The default request streams trades ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def trade_event_processor(event: Dict[str, Any]): @@ -1591,7 +1595,7 @@ def stream_closed_processor(): async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = [ "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", "0x7a57e705bb4e09c88aecfc295569481dbf2fe1d5efe364651fbe72385938e9b0", @@ -1623,8 +1627,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1668,7 +1672,7 @@ func main() { fmt.Println(err) return } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } } @@ -1824,24 +1828,26 @@ Get an orderbook snapshot for one or more spot markets. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = [ "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", "0x7a57e705bb4e09c88aecfc295569481dbf2fe1d5efe364651fbe72385938e9b0", ] - orderbooks = await client.fetch_spot_orderbooks_v2(market_ids=market_ids) - print(orderbooks) + depth = 1 + orderbooks = await client.fetch_spot_orderbooks_v2(market_ids=market_ids, depth=depth) + print(json.dumps(orderbooks, indent=2)) if __name__ == "__main__": @@ -1849,8 +1855,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1873,12 +1879,13 @@ func main() { ctx := context.Background() marketIds := []string{"0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0"} - res, err := exchangeClient.GetSpotOrderbooksV2(ctx, marketIds) + depth := int32(10) + res, err := exchangeClient.GetSpotOrderbooksV2(ctx, marketIds, depth) if err != nil { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -1995,16 +2002,16 @@ Stream orderbook snapshot updates for one or more spot markets. ### Request Parameters > Request Example: - - + + ```py import asyncio from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def orderbook_event_processor(event: Dict[str, Any]): @@ -2021,7 +2028,7 @@ def stream_closed_processor(): async def main() -> None: network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) market_ids = [ "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", "0x7a57e705bb4e09c88aecfc295569481dbf2fe1d5efe364651fbe72385938e9b0", @@ -2045,8 +2052,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2174,8 +2181,8 @@ Stream incremental orderbook updates for one or more spot markets. This stream s ### Request Parameters > Request Example: - - + + ```py import asyncio from decimal import Decimal @@ -2183,8 +2190,8 @@ from typing import Any, Dict from grpc import RpcError -from pyinjective.async_client import AsyncClient from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient def stream_error_processor(exception: RpcError): @@ -2212,9 +2219,9 @@ class Orderbook: self.levels = {"buys": {}, "sells": {}} -async def load_orderbook_snapshot(async_client: AsyncClient, orderbook: Orderbook): +async def load_orderbook_snapshot(client: IndexerClient, orderbook: Orderbook): # load the snapshot - res = await async_client.fetch_spot_orderbooks_v2(market_ids=[orderbook.market_id]) + res = await client.fetch_spot_orderbooks_v2(market_ids=[orderbook.market_id], depth=0) for snapshot in res["orderbooks"]: if snapshot["marketId"] != orderbook.market_id: raise Exception("unexpected snapshot") @@ -2233,13 +2240,12 @@ async def load_orderbook_snapshot(async_client: AsyncClient, orderbook: Orderboo quantity=Decimal(sell["quantity"]), timestamp=int(sell["timestamp"]), ) - break async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - async_client = AsyncClient(network) + client = IndexerClient(network) market_id = "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" orderbook = Orderbook(market_id=market_id) @@ -2251,7 +2257,7 @@ async def main() -> None: # start getting price levels updates task = asyncio.get_event_loop().create_task( - async_client.listen_spot_orderbook_updates( + client.listen_spot_orderbook_updates( market_ids=[market_id], callback=queue_event, on_end_callback=stream_closed_processor, @@ -2261,7 +2267,7 @@ async def main() -> None: tasks.append(task) # load the snapshot once we are already receiving updates, so we don't miss any - await load_orderbook_snapshot(async_client=async_client, orderbook=orderbook) + await load_orderbook_snapshot(client=client, orderbook=orderbook) task = asyncio.get_event_loop().create_task( apply_orderbook_update(orderbook=orderbook, updates_queue=updates_queue) @@ -2335,8 +2341,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2411,7 +2417,8 @@ func main() { // prepare orderbooks map orderbooks := map[string]*MapOrderbook{} - res, err := exchangeClient.GetSpotOrderbooksV2(ctx, marketIds) + depth := int32(0) + res, err := exchangeClient.GetSpotOrderbooksV2(ctx, marketIds, depth) if err != nil { panic(err) } @@ -2496,7 +2503,7 @@ func main() { } } - res, _ = exchangeClient.GetSpotOrderbooksV2(ctx, marketIds) + res, _ = exchangeClient.GetSpotOrderbooksV2(ctx, marketIds, depth) fmt.Println("query", res.Orderbooks[0].Orderbook.Sequence, len(res.Orderbooks[0].Orderbook.Sells), len(res.Orderbooks[0].Orderbook.Buys)) // print orderbook @@ -2616,20 +2623,21 @@ Get orders of a subaccount. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount_id = "0xc7dca7c15c364865f77a4fb67ab11dc95502e6fe000000000000000000000001" market_id = "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" skip = 10 @@ -2638,7 +2646,7 @@ async def main() -> None: orders = await client.fetch_spot_subaccount_orders_list( subaccount_id=subaccount_id, market_id=market_id, pagination=pagination ) - print(orders) + print(json.dumps(orders, indent=2)) if __name__ == "__main__": @@ -2646,8 +2654,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2687,7 +2695,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` @@ -2839,20 +2847,21 @@ Get trades of a subaccount. ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network +from pyinjective.indexer_client import IndexerClient async def main() -> None: # select network: local, testnet, mainnet network = Network.testnet() - client = AsyncClient(network) + client = IndexerClient(network) subaccount_id = "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000" market_id = "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" execution_type = "market" @@ -2867,7 +2876,7 @@ async def main() -> None: direction=direction, pagination=pagination, ) - print(trades) + print(json.dumps(trades, indent=2)) if __name__ == "__main__": @@ -2875,8 +2884,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -2916,7 +2925,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } ``` diff --git a/source/includes/_staking.md b/source/includes/_staking.md index f1892525..b5708dae 100644 --- a/source/includes/_staking.md +++ b/source/includes/_staking.md @@ -10,12 +10,13 @@ Queries validator commission and self-delegation rewards for validator ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -24,7 +25,7 @@ async def main() -> None: client = AsyncClient(network) validator_address = "injvaloper1jue5dpr9lerjn6wlwtrywxrsenrf28ru89z99z" distribution_info = await client.fetch_validator_distribution_info(validator_address=validator_address) - print(distribution_info) + print(json.dumps(distribution_info, indent=2)) if __name__ == "__main__": @@ -32,8 +33,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -52,7 +53,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -83,7 +84,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -101,7 +102,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -158,12 +159,13 @@ Queries rewards of a validator address ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -172,7 +174,7 @@ async def main() -> None: client = AsyncClient(network) validator_address = "injvaloper1jue5dpr9lerjn6wlwtrywxrsenrf28ru89z99z" rewards = await client.fetch_validator_outstanding_rewards(validator_address=validator_address) - print(rewards) + print(json.dumps(rewards, indent=2)) if __name__ == "__main__": @@ -180,8 +182,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -200,7 +202,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -231,7 +233,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -249,7 +251,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -307,12 +309,13 @@ Queries accumulated commission for a validator ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -321,7 +324,7 @@ async def main() -> None: client = AsyncClient(network) validator_address = "injvaloper1jue5dpr9lerjn6wlwtrywxrsenrf28ru89z99z" commission = await client.fetch_validator_commission(validator_address=validator_address) - print(commission) + print(json.dumps(commission, indent=2)) if __name__ == "__main__": @@ -329,8 +332,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -349,7 +352,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -380,7 +383,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -398,7 +401,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -456,12 +459,13 @@ Queries slash events of a validator ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -474,7 +478,7 @@ async def main() -> None: pagination = PaginationOption(limit=limit) validator_address = "injvaloper1jue5dpr9lerjn6wlwtrywxrsenrf28ru89z99z" contracts = await client.fetch_validator_slashes(validator_address=validator_address, pagination=pagination) - print(contracts) + print(json.dumps(contracts, indent=2)) if __name__ == "__main__": @@ -482,8 +486,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -503,7 +507,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -534,7 +538,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -555,7 +559,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -621,12 +625,13 @@ Queries the total rewards accrued by a delegation ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -638,7 +643,7 @@ async def main() -> None: rewards = await client.fetch_delegation_rewards( delegator_address=delegator_address, validator_address=validator_address ) - print(rewards) + print(json.dumps(rewards, indent=2)) if __name__ == "__main__": @@ -646,8 +651,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -666,7 +671,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -697,7 +702,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -716,7 +721,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -765,12 +770,13 @@ Queries the total rewards accrued by each validator ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -781,7 +787,7 @@ async def main() -> None: rewards = await client.fetch_delegation_total_rewards( delegator_address=delegator_address, ) - print(rewards) + print(json.dumps(rewards, indent=2)) if __name__ == "__main__": @@ -789,8 +795,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -809,7 +815,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -840,7 +846,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -858,7 +864,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -951,12 +957,13 @@ Queries the validators of a delegator ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -967,7 +974,7 @@ async def main() -> None: validators = await client.fetch_delegator_validators( delegator_address=delegator_address, ) - print(validators) + print(json.dumps(validators, indent=2)) if __name__ == "__main__": @@ -975,8 +982,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -995,7 +1002,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1026,7 +1033,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1044,7 +1051,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1084,12 +1091,13 @@ Queries the withdraw address of a delegator ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1100,7 +1108,7 @@ async def main() -> None: withdraw_address = await client.fetch_delegator_withdraw_address( delegator_address=delegator_address, ) - print(withdraw_address) + print(json.dumps(withdraw_address, indent=2)) if __name__ == "__main__": @@ -1108,8 +1116,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1128,7 +1136,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1159,7 +1167,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1177,7 +1185,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1211,12 +1219,13 @@ Queries the community pool coins ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1224,7 +1233,7 @@ async def main() -> None: network = Network.testnet() client = AsyncClient(network) community_pool = await client.fetch_community_pool() - print(community_pool) + print(json.dumps(community_pool, indent=2)) if __name__ == "__main__": @@ -1232,8 +1241,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1252,7 +1261,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1283,7 +1292,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1300,7 +1309,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1346,8 +1355,8 @@ Changes the withdraw address for a delegator (or validator self-delegation) ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -1373,7 +1382,7 @@ async def main() -> None: # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - message_broadcaster = MsgBroadcasterWithPk.new_without_simulation( + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( network=network, private_key=configured_private_key, gas_price=gas_price, @@ -1409,15 +1418,17 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -1428,7 +1439,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1459,7 +1470,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1468,7 +1479,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1481,16 +1495,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1510,75 +1524,38 @@ func main() { ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1591,8 +1568,8 @@ Withdraw rewards of a delegator ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -1600,7 +1577,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -1619,7 +1596,7 @@ async def main() -> None: # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - message_broadcaster = MsgBroadcasterWithPk.new_without_simulation( + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( network=network, private_key=configured_private_key, gas_price=gas_price, @@ -1655,17 +1632,20 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" @@ -1674,7 +1654,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1705,7 +1685,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1714,34 +1694,30 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := new(distributiontypes.MsgWithdrawDelegatorReward) - msg.DelegatorAddress = senderAddress.String() - msg.ValidatorAddress = "injvaloper14gy4acwjm96wd20awm9ar6j54lev5p7espy9ug" - - // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) - - if err != nil { - fmt.Println(err) + msg := distributiontypes.MsgWithdrawDelegatorReward{ + DelegatorAddress: senderAddress.String(), + ValidatorAddress: "injvaloper14gy4acwjm96wd20awm9ar6j54lev5p7espy9ug", } - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() + // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1773,75 +1749,38 @@ DEBU[0003] gas wanted: 195046 fn=func1 src="client/ch gas fee: 0.000097523 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1854,8 +1793,8 @@ Withdraws the full commission to the validator address ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -1863,7 +1802,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -1882,7 +1821,7 @@ async def main() -> None: # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - message_broadcaster = MsgBroadcasterWithPk.new_without_simulation( + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( network=network, private_key=configured_private_key, gas_price=gas_price, @@ -1916,15 +1855,17 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -1935,7 +1876,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1966,7 +1907,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1975,7 +1916,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1987,16 +1931,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -2015,75 +1959,38 @@ func main() { ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -2096,8 +2003,8 @@ Allows an account to directly fund the community pool ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -2124,7 +2031,7 @@ async def main() -> None: # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - message_broadcaster = MsgBroadcasterWithPk.new_without_simulation( + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( network=network, private_key=configured_private_key, gas_price=gas_price, @@ -2160,15 +2067,17 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" rpchttp "github.com/cometbft/cometbft/rpc/client/http" @@ -2181,7 +2090,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2212,7 +2121,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -2221,7 +2130,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -2234,16 +2146,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(msg) + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -2260,9 +2172,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -2272,75 +2184,38 @@ func main() { ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -2353,25 +2228,24 @@ Performs a coins delegation from a delegator to a validator ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -2379,64 +2253,40 @@ async def main() -> None: # initialize grpc client client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare tx msg validator_address = "injvaloper1ultw9r29l8nxy5u6thcgusjn95vsy2caw722q5" amount = 100 - msg = composer.MsgDelegate( + msg = composer.msg_delegate( delegator_address=address.to_acc_bech32(), validator_address=validator_address, amount=amount ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -2444,28 +2294,31 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" + "encoding/json" "fmt" "os" "time" "cosmossdk.io/math" - "github.com/InjectiveLabs/sdk-go/client/common" - - chainclient "github.com/InjectiveLabs/sdk-go/client/chain" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -2496,7 +2349,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -2505,37 +2358,34 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - msg := new(stakingtypes.MsgDelegate) - msg.DelegatorAddress = senderAddress.String() - msg.ValidatorAddress = "injvaloper14gy4acwjm96wd20awm9ar6j54lev5p7espy9ug" - msg.Amount = sdktypes.Coin{ - Denom: "inj", Amount: math.NewInt(1000000000000000000), // 1 INJ + msg := stakingtypes.MsgDelegate{ + DelegatorAddress: senderAddress.String(), + ValidatorAddress: "injvaloper14gy4acwjm96wd20awm9ar6j54lev5p7espy9ug", + Amount: sdktypes.Coin{ + Denom: "inj", + Amount: math.NewInt(1000000000000000000), // 1 INJ + }, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - err = chainClient.QueueBroadcastMsg(msg) + _, response, err := chainClient.BroadcastMsg(ctx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC, &msg) if err != nil { - fmt.Println(err) - } - - time.Sleep(time.Second * 5) - - gasFee, err := chainClient.GetGasFee() - - if err != nil { - fmt.Println(err) - return + panic(err) } - fmt.Println("gas fee:", gasFee, "INJ") + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -2553,9 +2403,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -2577,73 +2427,36 @@ DEBU[0003] gas wanted: 207846 fn=func1 src="client/ch gas fee: 0.000103923 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_tendermint.md b/source/includes/_tendermint.md index b8bbb6ac..1da9d7f0 100644 --- a/source/includes/_tendermint.md +++ b/source/includes/_tendermint.md @@ -11,12 +11,12 @@ Gets the current node info ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -33,8 +33,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -53,7 +53,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -84,7 +84,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -101,7 +101,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -231,12 +231,12 @@ Returns the node's syncing status ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -253,8 +253,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -273,7 +273,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -304,7 +304,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -321,7 +321,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -354,12 +354,13 @@ Get the latest block ### Request Parameters > Request Example: - - + + ```py import asyncio +import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -368,7 +369,7 @@ async def main() -> None: client = AsyncClient(network) latest_block = await client.fetch_latest_block() - print(latest_block) + print(json.dumps(latest_block, indent=2)) if __name__ == "__main__": @@ -376,8 +377,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -395,8 +396,8 @@ import ( ) func main() { - network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + network := common.LoadNetwork("devnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -427,7 +428,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -444,7 +445,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -760,12 +761,12 @@ Get the block for a given height ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -782,8 +783,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -802,7 +803,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -833,7 +834,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -851,7 +852,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1194,14 +1195,14 @@ Get the latest validator-set ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1219,8 +1220,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1238,7 +1239,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1269,7 +1270,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1382,14 +1383,14 @@ Get the validator-set at a given height ### Request Parameters > Request Example: - - + + ```py import asyncio from google.protobuf import symbol_database -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1410,8 +1411,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1431,7 +1432,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1462,7 +1463,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), diff --git a/source/includes/_tokenfactory.md b/source/includes/_tokenfactory.md index d967f542..9fe8b682 100644 --- a/source/includes/_tokenfactory.md +++ b/source/includes/_tokenfactory.md @@ -11,12 +11,12 @@ Gets the authority metadata for tokens by their creator address ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -35,8 +35,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -55,7 +55,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -86,7 +86,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -105,7 +105,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -157,12 +157,12 @@ Gets all the tokens created by a specific admin/creator ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -178,8 +178,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -198,7 +198,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -229,7 +229,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -247,7 +247,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -366,12 +366,12 @@ Retrieves the entire auctions module's state ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -387,8 +387,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -407,7 +407,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -438,7 +438,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -455,7 +455,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -575,9 +575,9 @@ No parameters **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int

@@ -610,8 +610,8 @@ Create a new denom ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -619,7 +619,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -676,25 +676,28 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -724,7 +727,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -733,29 +736,33 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - message := new(tokenfactorytypes.MsgCreateDenom) - message.Sender = senderAddress.String() - message.Subdenom = "inj_test" - message.Name = "Injective Test Token" - message.Symbol = "INJTEST" - message.Decimals = 18 + message := tokenfactorytypes.MsgCreateDenom{ + Sender: senderAddress.String(), + Subdenom: "inj_test", + Name: "Injective Test Token", + Symbol: "INJTEST", + Decimals: 18, + } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(message) + response, err := chainClient.AsyncBroadcastMsg(ctx, &message) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -780,75 +787,38 @@ func main() { ``` go ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -862,8 +832,8 @@ Allows a token admin's account to mint more units ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -871,7 +841,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -927,28 +897,30 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + sdktypes "github.com/cosmos/cosmos-sdk/types" tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - sdktypes "github.com/cosmos/cosmos-sdk/types" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -978,7 +950,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -987,29 +959,33 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - message := new(tokenfactorytypes.MsgMint) - message.Sender = senderAddress.String() - message.Amount = sdktypes.Coin{ - Denom: "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test", - Amount: math.NewInt(1000000000), + message := tokenfactorytypes.MsgMint{ + Sender: senderAddress.String(), + Amount: sdktypes.Coin{ + Denom: "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test", + Amount: math.NewInt(1000000000), + }, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(message) + response, err := chainClient.AsyncBroadcastMsg(ctx, &message) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1026,9 +1002,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -1040,75 +1016,38 @@ func main() { ``` go ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1122,8 +1061,8 @@ Allows a token admin's account to burn circulating units ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -1131,7 +1070,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -1187,28 +1126,30 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + sdktypes "github.com/cosmos/cosmos-sdk/types" tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - sdktypes "github.com/cosmos/cosmos-sdk/types" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1238,7 +1179,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1247,29 +1188,33 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - message := new(tokenfactorytypes.MsgBurn) - message.Sender = senderAddress.String() - message.Amount = sdktypes.Coin{ - Denom: "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test", - Amount: math.NewInt(100), + message := tokenfactorytypes.MsgBurn{ + Sender: senderAddress.String(), + Amount: sdktypes.Coin{ + Denom: "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test", + Amount: math.NewInt(100), + }, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(message) + response, err := chainClient.AsyncBroadcastMsg(ctx, &message) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1286,9 +1231,9 @@ func main() { **Coin** - - -
ParameterTypeDescriptionRequired
denomStringThe token denomYes
amountStringThe amount of tokensYes
+ + +
ParameterTypeDescription
denomstring
amountcosmossdk_io_math.Int
### Response Parameters @@ -1300,75 +1245,38 @@ func main() { ``` go ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1382,8 +1290,8 @@ Allows a token admin's account to set the token metadata ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -1391,7 +1299,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -1411,7 +1319,7 @@ async def main() -> None: # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - message_broadcaster = MsgBroadcasterWithPk.new_without_simulation( + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( network=network, private_key=private_key_in_hexa, gas_price=gas_price, @@ -1461,15 +1369,17 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -1481,7 +1391,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1511,7 +1421,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1520,7 +1430,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1552,21 +1465,22 @@ func main() { Decimals: tokenDecimals, } - message := new(tokenfactorytypes.MsgSetDenomMetadata) - message.Sender = senderAddress.String() - message.Metadata = metadata + message := tokenfactorytypes.MsgSetDenomMetadata{ + Sender: senderAddress.String(), + Metadata: metadata, + } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(message) + response, err := chainClient.AsyncBroadcastMsg(ctx, &message) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1615,75 +1529,38 @@ func main() { ``` go ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -1697,8 +1574,8 @@ Allows a token admin's account to transfer administrative privileged to other ac ### Request Parameters > Request Example: - - + + ```py import asyncio import json @@ -1706,7 +1583,7 @@ import os import dotenv -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network from pyinjective.wallet import PrivateKey @@ -1726,7 +1603,7 @@ async def main() -> None: # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - message_broadcaster = MsgBroadcasterWithPk.new_without_simulation( + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( network=network, private_key=private_key_in_hexa, gas_price=gas_price, @@ -1760,15 +1637,17 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" @@ -1779,7 +1658,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1809,7 +1688,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -1818,28 +1697,32 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) - message := new(tokenfactorytypes.MsgChangeAdmin) - message.Sender = senderAddress.String() - message.Denom = "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test" - // This is the zero address to remove admin permissions - message.NewAdmin = "inj1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqe2hm49" + message := tokenfactorytypes.MsgChangeAdmin{ + Sender: senderAddress.String(), + Denom: "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test", + // This is the zero address to remove admin permissions + NewAdmin: "inj1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqe2hm49", + } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(message) + response, err := chainClient.AsyncBroadcastMsg(ctx, &message) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Print(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -1861,73 +1744,36 @@ func main() { ``` go ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_txfees.md b/source/includes/_txfees.md index 3def2a0c..77d4d79e 100644 --- a/source/includes/_txfees.md +++ b/source/includes/_txfees.md @@ -12,13 +12,13 @@ Retrieves the current chain gas price ### Request Parameters > Request Example: - - + + ```py import asyncio import json -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -34,8 +34,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -43,18 +43,18 @@ import ( "context" "encoding/json" "fmt" - "os" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -85,7 +85,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -102,7 +102,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } diff --git a/source/includes/_wasm.md b/source/includes/_wasm.md index a294fdf9..d6d6791d 100644 --- a/source/includes/_wasm.md +++ b/source/includes/_wasm.md @@ -12,12 +12,12 @@ Queries validator commission and self-delegation rewards for validator ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -34,8 +34,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -54,7 +54,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -85,7 +85,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -103,7 +103,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -180,12 +180,12 @@ Gets the contract code history ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -206,8 +206,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -228,7 +228,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -259,7 +259,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -278,7 +278,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -431,12 +431,12 @@ Get all smart contracts for a code id ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -457,8 +457,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -479,7 +479,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -510,7 +510,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -529,7 +529,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -587,12 +587,12 @@ Gets all raw store data for a single contract ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -613,8 +613,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -635,7 +635,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -666,7 +666,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -685,7 +685,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -758,12 +758,12 @@ Gets single key from the raw store data of a contract ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -781,8 +781,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -800,7 +800,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -831,7 +831,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -850,7 +850,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -885,12 +885,12 @@ Get smart query result from the contract ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -908,8 +908,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -927,7 +927,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -958,7 +958,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -977,7 +977,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1018,13 +1018,13 @@ Gets the binary code and metadata for a contract ### Request Parameters > Request Example: - - + + ```py import asyncio import base64 -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.core.network import Network @@ -1044,8 +1044,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1063,7 +1063,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1094,7 +1094,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1112,7 +1112,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1197,12 +1197,12 @@ Gets the metadata for all stored contract codes ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1222,8 +1222,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1244,7 +1244,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1275,7 +1275,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1293,7 +1293,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1407,12 +1407,12 @@ Gets the pinned code ids ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1432,8 +1432,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1454,7 +1454,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1485,7 +1485,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1503,7 +1503,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1560,12 +1560,12 @@ Gets the contracts by creator ### Request Parameters > Request Example: - - + + ```py import asyncio -from pyinjective.async_client import AsyncClient +from pyinjective.async_client_v2 import AsyncClient from pyinjective.client.model.pagination import PaginationOption from pyinjective.core.network import Network @@ -1586,8 +1586,8 @@ if __name__ == "__main__": ``` - - + + ```go package main @@ -1608,7 +1608,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -1639,7 +1639,7 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, common.OptionGasPrices(client.DefaultGasPriceWithDenom), @@ -1658,7 +1658,7 @@ func main() { fmt.Println(err) } - str, _ := json.MarshalIndent(res, "", " ") + str, _ := json.MarshalIndent(res, "", "\t") fmt.Print(string(str)) } @@ -1711,25 +1711,24 @@ func main() { ### Request Parameters > Request Example: - - + + ```py import asyncio +import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() @@ -1738,13 +1737,22 @@ async def main() -> None: # set custom cookie location (optional) - defaults to current dir client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare tx msg # NOTE: COIN MUST BE SORTED IN ALPHABETICAL ORDER BY DENOMS @@ -1756,55 +1764,22 @@ async def main() -> None: composer.coin(amount=420, denom="peggy0x44C21afAaF20c270EBbF5914Cfc3b5022173FEB7"), composer.coin(amount=1, denom="peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5"), ] - msg = composer.MsgExecuteContract( + msg = composer.msg_execute_contract( sender=address.to_acc_bech32(), contract="inj1ady3s7whq30l4fx8sj3x6muv5mx4dfdlcpv8n7", msg='{"increment":{}}', funds=funds, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) - # build tx gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -1838,75 +1813,38 @@ gas wanted: 217930 gas fee: 0.000108965 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
@@ -2021,73 +1959,36 @@ gas wanted: 139666 gas fee: 0.000069833 INJ ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/includes/_wasmx.md b/source/includes/_wasmx.md index 2986e769..99363129 100644 --- a/source/includes/_wasmx.md +++ b/source/includes/_wasmx.md @@ -10,39 +10,46 @@ Wasmx smart contract interactions. ### Request Parameters > Request Example: - - + + ```py import asyncio import json import os import dotenv -from grpc import RpcError -from pyinjective.async_client import AsyncClient -from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk from pyinjective.core.network import Network -from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey async def main() -> None: dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") # select network: local, testnet, mainnet network = Network.testnet() client = AsyncClient(network) composer = await client.composer() - await client.sync_timeout_height() - # load account - priv_key = PrivateKey.from_hex(configured_private_key) + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) pub_key = priv_key.to_public_key() address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) # prepare tx msg # NOTE: COIN MUST BE SORTED IN ALPHABETICAL ORDER BY DENOMS @@ -59,48 +66,15 @@ async def main() -> None: funds=funds, ) - # build sim tx - tx = ( - Transaction() - .with_messages(msg) - .with_sequence(client.get_sequence()) - .with_account_num(client.get_number()) - .with_chain_id(network.chain_id) - ) - sim_sign_doc = tx.get_sign_doc(pub_key) - sim_sig = priv_key.sign(sim_sign_doc.SerializeToString()) - sim_tx_raw_bytes = tx.get_tx_data(sim_sig, pub_key) - - # simulate tx - try: - sim_res = await client.simulate(sim_tx_raw_bytes) - except RpcError as ex: - print(ex) - return - - # build tx + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + gas_price = await client.current_chain_gas_price() # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gas_price = int(gas_price * 1.1) - - gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation - gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") - fee = [ - composer.coin( - amount=gas_price * gas_limit, - denom=network.fee_denom, - ) - ] - tx = tx.with_gas(gas_limit).with_fee(fee).with_memo("").with_timeout_height(client.timeout_height) - sign_doc = tx.get_sign_doc(pub_key) - sig = priv_key.sign(sign_doc.SerializeToString()) - tx_raw_bytes = tx.get_tx_data(sig, pub_key) - - # broadcast tx: send_tx_async_mode, send_tx_sync_mode, send_tx_block_mode - res = await client.broadcast_tx_sync_mode(tx_raw_bytes) - print(res) - print("gas wanted: {}".format(gas_limit)) - print("gas fee: {} INJ".format(gas_fee)) + message_broadcaster.update_gas_price(gas_price=gas_price) if __name__ == "__main__": @@ -108,15 +82,17 @@ if __name__ == "__main__": ``` - - + + ```go package main import ( + "context" "encoding/json" "fmt" "os" + "time" rpchttp "github.com/cometbft/cometbft/rpc/client/http" @@ -127,7 +103,7 @@ import ( func main() { network := common.LoadNetwork("testnet", "lb") - tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + tmClient, err := rpchttp.New(network.TmEndpoint) if err != nil { panic(err) } @@ -157,7 +133,7 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - chainClient, err := chainclient.NewChainClient( + chainClient, err := chainclient.NewChainClientV2( clientCtx, network, ) @@ -166,7 +142,10 @@ func main() { panic(err) } - gasPrice := chainClient.CurrentChainGasPrice() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -195,16 +174,16 @@ func main() { } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg - response, err := chainClient.AsyncBroadcastMsg(&message) + response, err := chainClient.AsyncBroadcastMsg(ctx, &message) if err != nil { panic(err) } - str, _ := json.MarshalIndent(response, "", " ") + str, _ := json.MarshalIndent(response, "", "\t") fmt.Println(string(str)) - gasPrice = chainClient.CurrentChainGasPrice() + gasPrice = chainClient.CurrentChainGasPrice(ctx) // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted gasPrice = int64(float64(gasPrice) * 1.1) chainClient.SetGasPrice(gasPrice) @@ -228,73 +207,36 @@ func main() { ``` go ``` - -
ParamterTypeDescription
tx_responseTxResponseTransaction details
+ +
ParameterTypeDescription
tx_responsetypes.TxResponsetx_response is the queried TxResponses.

**TxResponse** - - - - - - - - - - - - - -
ParameterTypeDescription
heightIntegerThe block height
tx_hashStringTransaction hash
codespaceStringNamespace for the code
codeIntegerResponse code (zero for success, non-zero for errors)
dataStringBytes, if any
raw_logStringThe output of the application's logger (raw string)
logsABCIMessageLog ArrayThe output of the application's logger (typed)
infoStringAdditional information
gas_wantedIntegerAmount of gas requested for the transaction
gas_usedIntegerAmount of gas consumed by the transaction
txAnyThe request transaction bytes
timestampStringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time
eventsEvent ArrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages.
+ + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txtypes.AnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsv1.Event arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

**ABCIMessageLog** - - - -
ParameterTypeDescription
msg_indexIntegerThe message index
logStringThe log message
eventsStringEvent ArrayEvent objects that were emitted during the execution
- - -
- -**Event** - - - -
ParameterTypeDescription
typeStringEvent type
attributesEventAttribute ArrayAll event object details
- - -
- -**StringEvent** - - - -
ParameterTypeDescription
typeStringEvent type
attributesAttribute ArrayEvent data
- - -
- -**EventAttribute** - - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
indexBooleanIf attribute is indexed
- - -
- -**Attribute** - - - -
ParameterTypeDescription
keyStringAttribute key
valueStringAttribute value
+ + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
diff --git a/source/index.html.md b/source/index.html.md index 1da4eb5d..9580b959 100644 --- a/source/index.html.md +++ b/source/index.html.md @@ -36,6 +36,8 @@ includes: - derivatives - spot - binaryoptions + - erc20 + - evm - ibccorechannel - ibccoreclient - ibccoreconnection diff --git a/source/json_tables/chain/exchange/adminPermission.json b/source/json_tables/adminPermission.json similarity index 100% rename from source/json_tables/chain/exchange/adminPermission.json rename to source/json_tables/adminPermission.json diff --git a/source/json_tables/chain/abciMessageLog.json b/source/json_tables/chain/abciMessageLog.json deleted file mode 100644 index 5540eb85..00000000 --- a/source/json_tables/chain/abciMessageLog.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - {"Parameter": "msg_index", "Type": "Integer", "Description": "The message index"}, - {"Parameter": "log", "Type": "String", "Description": "The log message"}, - {"Parameter": "events", "Type": "StringEvent Array", "Description": "Event objects that were emitted during the execution"} -] \ No newline at end of file diff --git a/source/json_tables/chain/attribute.json b/source/json_tables/chain/attribute.json deleted file mode 100644 index 70be66d6..00000000 --- a/source/json_tables/chain/attribute.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - {"Parameter": "key", "Type": "String", "Description": "Attribute key"}, - {"Parameter": "value", "Type": "String", "Description": "Attribute value"} -] \ No newline at end of file diff --git a/source/json_tables/chain/errors/auction.json b/source/json_tables/chain/errors/auction.json new file mode 100644 index 00000000..96ce58cb --- /dev/null +++ b/source/json_tables/chain/errors/auction.json @@ -0,0 +1,10 @@ +[ + { + "Error Code": 1, + "Description": "invalid bid denom" + }, + { + "Error Code": 2, + "Description": "invalid bid round" + } +] diff --git a/source/json_tables/chain/errors/erc20.json b/source/json_tables/chain/errors/erc20.json new file mode 100644 index 00000000..356894ee --- /dev/null +++ b/source/json_tables/chain/errors/erc20.json @@ -0,0 +1,42 @@ +[ + { + "Error Code": 2, + "Description": "attempting to create a token pair for bank denom that already has a pair associated" + }, + { + "Error Code": 3, + "Description": "unauthorized account" + }, + { + "Error Code": 4, + "Description": "invalid genesis" + }, + { + "Error Code": 5, + "Description": "invalid token pair" + }, + { + "Error Code": 6, + "Description": "invalid ERC20 contract address" + }, + { + "Error Code": 7, + "Description": "unknown bank denom or zero supply" + }, + { + "Error Code": 8, + "Description": "error uploading ERC20 contract" + }, + { + "Error Code": 9, + "Description": "invalid token factory denom" + }, + { + "Error Code": 10, + "Description": "respective erc20:... denom has existing supply" + }, + { + "Error Code": 11, + "Description": "invalid query request" + } +] diff --git a/source/json_tables/chain/errors/exchange.json b/source/json_tables/chain/errors/exchange.json new file mode 100644 index 00000000..a1ba2790 --- /dev/null +++ b/source/json_tables/chain/errors/exchange.json @@ -0,0 +1,434 @@ +[ + { + "Error Code": 1, + "Description": "failed to validate order" + }, + { + "Error Code": 2, + "Description": "spot market not found" + }, + { + "Error Code": 3, + "Description": "spot market exists" + }, + { + "Error Code": 4, + "Description": "struct field error" + }, + { + "Error Code": 5, + "Description": "failed to validate market" + }, + { + "Error Code": 6, + "Description": "subaccount has insufficient deposits" + }, + { + "Error Code": 7, + "Description": "unrecognized order type" + }, + { + "Error Code": 8, + "Description": "position quantity insufficient for order" + }, + { + "Error Code": 9, + "Description": "order hash is not valid" + }, + { + "Error Code": 10, + "Description": "subaccount id is not valid" + }, + { + "Error Code": 11, + "Description": "invalid ticker" + }, + { + "Error Code": 12, + "Description": "invalid base denom" + }, + { + "Error Code": 13, + "Description": "invalid quote denom" + }, + { + "Error Code": 14, + "Description": "invalid oracle" + }, + { + "Error Code": 15, + "Description": "invalid expiry" + }, + { + "Error Code": 16, + "Description": "invalid price" + }, + { + "Error Code": 17, + "Description": "invalid quantity" + }, + { + "Error Code": 18, + "Description": "unsupported oracle type" + }, + { + "Error Code": 19, + "Description": "order doesnt exist" + }, + { + "Error Code": 20, + "Description": "spot limit orderbook fill invalid" + }, + { + "Error Code": 21, + "Description": "perpetual market exists" + }, + { + "Error Code": 22, + "Description": "expiry futures market exists" + }, + { + "Error Code": 23, + "Description": "expiry futures market expired" + }, + { + "Error Code": 24, + "Description": "no liquidity on the orderbook!" + }, + { + "Error Code": 25, + "Description": "Orderbook liquidity cannot satisfy current worst price" + }, + { + "Error Code": 26, + "Description": "insufficient margin" + }, + { + "Error Code": 27, + "Description": "Derivative market not found" + }, + { + "Error Code": 28, + "Description": "Position not found" + }, + { + "Error Code": 29, + "Description": "Position direction does not oppose the reduce-only order" + }, + { + "Error Code": 30, + "Description": "Price Surpasses Bankruptcy Price" + }, + { + "Error Code": 31, + "Description": "Position not liquidable" + }, + { + "Error Code": 32, + "Description": "invalid trigger price" + }, + { + "Error Code": 33, + "Description": "invalid oracle type" + }, + { + "Error Code": 34, + "Description": "invalid minimum price tick size" + }, + { + "Error Code": 35, + "Description": "invalid minimum quantity tick size" + }, + { + "Error Code": 36, + "Description": "invalid minimum order margin" + }, + { + "Error Code": 37, + "Description": "Exceeds order side count" + }, + { + "Error Code": 38, + "Description": "Subaccount cannot place a market order when a market order in the same market was already placed in same block" + }, + { + "Error Code": 39, + "Description": "cannot place a conditional market order when a conditional market order in same relative direction already exists" + }, + { + "Error Code": 40, + "Description": "An equivalent market launch proposal already exists." + }, + { + "Error Code": 41, + "Description": "Invalid Market Status" + }, + { + "Error Code": 42, + "Description": "base denom cannot be same with quote denom" + }, + { + "Error Code": 43, + "Description": "oracle base cannot be same with oracle quote" + }, + { + "Error Code": 44, + "Description": "MakerFeeRate does not match TakerFeeRate requirements" + }, + { + "Error Code": 45, + "Description": "Ensure that MaintenanceMarginRatio < InitialMarginRatio <= ReduceMarginRatio" + }, + { + "Error Code": 46, + "Description": "OracleScaleFactor cannot be greater than MaxOracleScaleFactor" + }, + { + "Error Code": 47, + "Description": "Spot exchange is not enabled yet" + }, + { + "Error Code": 48, + "Description": "Derivatives exchange is not enabled yet" + }, + { + "Error Code": 49, + "Description": "Oracle price delta exceeds threshold" + }, + { + "Error Code": 50, + "Description": "Invalid hourly interest rate" + }, + { + "Error Code": 51, + "Description": "Invalid hourly funding rate cap" + }, + { + "Error Code": 52, + "Description": "Only perpetual markets can update funding parameters" + }, + { + "Error Code": 53, + "Description": "Invalid trading reward campaign" + }, + { + "Error Code": 54, + "Description": "Invalid fee discount schedule" + }, + { + "Error Code": 55, + "Description": "invalid liquidation order" + }, + { + "Error Code": 56, + "Description": "Unknown error happened for campaign distributions" + }, + { + "Error Code": 57, + "Description": "Invalid trading reward points update" + }, + { + "Error Code": 58, + "Description": "Invalid batch msg update" + }, + { + "Error Code": 59, + "Description": "Post-only order exceeds top of book price" + }, + { + "Error Code": 60, + "Description": "Order type not supported for given message" + }, + { + "Error Code": 61, + "Description": "Sender must match dmm account" + }, + { + "Error Code": 62, + "Description": "already opted out of rewards" + }, + { + "Error Code": 63, + "Description": "Invalid margin ratio" + }, + { + "Error Code": 64, + "Description": "Provided funds are below minimum" + }, + { + "Error Code": 65, + "Description": "Position is below initial margin requirement" + }, + { + "Error Code": 66, + "Description": "Pool has non-positive total lp token supply" + }, + { + "Error Code": 67, + "Description": "Passed lp token burn amount is greater than total lp token supply" + }, + { + "Error Code": 68, + "Description": "unsupported action" + }, + { + "Error Code": 69, + "Description": "position quantity cannot be negative" + }, + { + "Error Code": 70, + "Description": "binary options market exists" + }, + { + "Error Code": 71, + "Description": "binary options market not found" + }, + { + "Error Code": 72, + "Description": "invalid settlement" + }, + { + "Error Code": 73, + "Description": "account doesnt exist" + }, + { + "Error Code": 74, + "Description": "sender should be a market admin" + }, + { + "Error Code": 75, + "Description": "market is already scheduled to settle" + }, + { + "Error Code": 76, + "Description": "market not found" + }, + { + "Error Code": 77, + "Description": "denom decimal cannot be higher than max scale factor" + }, + { + "Error Code": 78, + "Description": "state is invalid" + }, + { + "Error Code": 79, + "Description": "transient orders up to cancellation not supported" + }, + { + "Error Code": 80, + "Description": "invalid trade" + }, + { + "Error Code": 81, + "Description": "no margin locked in subaccount" + }, + { + "Error Code": 82, + "Description": "Invalid access level to perform action" + }, + { + "Error Code": 83, + "Description": "Invalid address" + }, + { + "Error Code": 84, + "Description": "Invalid argument" + }, + { + "Error Code": 85, + "Description": "Invalid funds direction" + }, + { + "Error Code": 86, + "Description": "No funds provided" + }, + { + "Error Code": 87, + "Description": "Invalid signature" + }, + { + "Error Code": 88, + "Description": "no funds to unlock" + }, + { + "Error Code": 89, + "Description": "No msgs provided" + }, + { + "Error Code": 90, + "Description": "No msg provided" + }, + { + "Error Code": 91, + "Description": "Invalid amount" + }, + { + "Error Code": 92, + "Description": "The current feature has been disabled" + }, + { + "Error Code": 93, + "Description": "Order has too much margin" + }, + { + "Error Code": 94, + "Description": "Subaccount nonce is invalid" + }, + { + "Error Code": 95, + "Description": "insufficient funds" + }, + { + "Error Code": 96, + "Description": "exchange is in post-only mode" + }, + { + "Error Code": 97, + "Description": "client order id already exists" + }, + { + "Error Code": 98, + "Description": "client order id is invalid. Max length is 36 chars" + }, + { + "Error Code": 99, + "Description": "market cannot be settled in emergency mode" + }, + { + "Error Code": 100, + "Description": "invalid notional" + }, + { + "Error Code": 101, + "Description": "stale oracle price" + }, + { + "Error Code": 102, + "Description": "invalid stake grant" + }, + { + "Error Code": 103, + "Description": "insufficient stake for grant" + }, + { + "Error Code": 104, + "Description": "invalid permissions" + }, + { + "Error Code": 105, + "Description": "the decimals specified for the denom is incorrect" + }, + { + "Error Code": 106, + "Description": "insufficient market balance" + }, + { + "Error Code": 107, + "Description": "invalid expiration block" + }, + { + "Error Code": 108, + "Description": "v1 perpetual and expiry market launch proposal is not supported" + } +] diff --git a/source/json_tables/chain/errors/insurance.json b/source/json_tables/chain/errors/insurance.json new file mode 100644 index 00000000..9da06ad4 --- /dev/null +++ b/source/json_tables/chain/errors/insurance.json @@ -0,0 +1,50 @@ +[ + { + "Error Code": 1, + "Description": "insurance fund already exists" + }, + { + "Error Code": 2, + "Description": "insurance fund not found" + }, + { + "Error Code": 3, + "Description": "redemption already exists" + }, + { + "Error Code": 4, + "Description": "invalid deposit amount" + }, + { + "Error Code": 5, + "Description": "invalid deposit denom" + }, + { + "Error Code": 6, + "Description": "insurance payout exceeds deposits" + }, + { + "Error Code": 7, + "Description": "invalid ticker" + }, + { + "Error Code": 8, + "Description": "invalid quote denom" + }, + { + "Error Code": 9, + "Description": "invalid oracle" + }, + { + "Error Code": 10, + "Description": "invalid expiration time" + }, + { + "Error Code": 11, + "Description": "invalid marketID" + }, + { + "Error Code": 12, + "Description": "invalid share denom" + } +] diff --git a/source/json_tables/chain/errors/ocr.json b/source/json_tables/chain/errors/ocr.json new file mode 100644 index 00000000..463cbfa2 --- /dev/null +++ b/source/json_tables/chain/errors/ocr.json @@ -0,0 +1,94 @@ +[ + { + "Error Code": 1, + "Description": "stale report" + }, + { + "Error Code": 2, + "Description": "incomplete proposal" + }, + { + "Error Code": 3, + "Description": "repeated oracle address" + }, + { + "Error Code": 4, + "Description": "too many signers" + }, + { + "Error Code": 5, + "Description": "incorrect config" + }, + { + "Error Code": 6, + "Description": "config digest doesn't match" + }, + { + "Error Code": 7, + "Description": "wrong number of signatures" + }, + { + "Error Code": 8, + "Description": "incorrect signature" + }, + { + "Error Code": 9, + "Description": "no transmitter specified" + }, + { + "Error Code": 10, + "Description": "incorrect transmission data" + }, + { + "Error Code": 11, + "Description": "no transmissions found" + }, + { + "Error Code": 12, + "Description": "median value is out of bounds" + }, + { + "Error Code": 13, + "Description": "LINK denom doesn't match" + }, + { + "Error Code": 14, + "Description": "Reward Pool doesn't exist" + }, + { + "Error Code": 15, + "Description": "wrong number of payees and transmitters" + }, + { + "Error Code": 16, + "Description": "action is restricted to the module admin" + }, + { + "Error Code": 17, + "Description": "feed already exists" + }, + { + "Error Code": 19, + "Description": "feed doesnt exists" + }, + { + "Error Code": 20, + "Description": "action is admin-restricted" + }, + { + "Error Code": 21, + "Description": "insufficient reward pool" + }, + { + "Error Code": 22, + "Description": "payee already set" + }, + { + "Error Code": 23, + "Description": "action is payee-restricted" + }, + { + "Error Code": 24, + "Description": "feed config not found" + } +] diff --git a/source/json_tables/chain/errors/oracle.json b/source/json_tables/chain/errors/oracle.json new file mode 100644 index 00000000..e522667c --- /dev/null +++ b/source/json_tables/chain/errors/oracle.json @@ -0,0 +1,174 @@ +[ + { + "Error Code": 1, + "Description": "relayer address is empty" + }, + { + "Error Code": 2, + "Description": "bad rates count" + }, + { + "Error Code": 3, + "Description": "bad resolve times" + }, + { + "Error Code": 4, + "Description": "bad request ID" + }, + { + "Error Code": 5, + "Description": "relayer not authorized" + }, + { + "Error Code": 6, + "Description": "bad price feed base count" + }, + { + "Error Code": 7, + "Description": "bad price feed quote count" + }, + { + "Error Code": 8, + "Description": "unsupported oracle type" + }, + { + "Error Code": 9, + "Description": "bad messages count" + }, + { + "Error Code": 10, + "Description": "bad Coinbase message" + }, + { + "Error Code": 11, + "Description": "bad Ethereum signature" + }, + { + "Error Code": 12, + "Description": "bad Coinbase message timestamp" + }, + { + "Error Code": 13, + "Description": "Coinbase price not found" + }, + { + "Error Code": 14, + "Description": "Prices must be positive" + }, + { + "Error Code": 15, + "Description": "Prices must be less than 10 million." + }, + { + "Error Code": 16, + "Description": "Invalid Band IBC Request" + }, + { + "Error Code": 17, + "Description": "sample error" + }, + { + "Error Code": 18, + "Description": "invalid packet timeout" + }, + { + "Error Code": 19, + "Description": "invalid symbols count" + }, + { + "Error Code": 20, + "Description": "could not claim port capability" + }, + { + "Error Code": 21, + "Description": "invalid IBC Port ID" + }, + { + "Error Code": 22, + "Description": "invalid IBC Channel ID" + }, + { + "Error Code": 23, + "Description": "invalid Band IBC request interval" + }, + { + "Error Code": 24, + "Description": "Invalid Band IBC Update Request Proposal" + }, + { + "Error Code": 25, + "Description": "Band IBC Oracle Request not found" + }, + { + "Error Code": 26, + "Description": "Base Info is empty" + }, + { + "Error Code": 27, + "Description": "provider is empty" + }, + { + "Error Code": 28, + "Description": "invalid provider name" + }, + { + "Error Code": 29, + "Description": "invalid symbol" + }, + { + "Error Code": 30, + "Description": "relayer already exists" + }, + { + "Error Code": 31, + "Description": "provider price not found" + }, + { + "Error Code": 32, + "Description": "invalid oracle request" + }, + { + "Error Code": 33, + "Description": "no price for oracle was found" + }, + { + "Error Code": 34, + "Description": "no address for Pyth contract found" + }, + { + "Error Code": 35, + "Description": "unauthorized Pyth price relay" + }, + { + "Error Code": 36, + "Description": "unauthorized Pyth price relay" + }, + { + "Error Code": 37, + "Description": "unauthorized Pyth price relay" + }, + { + "Error Code": 38, + "Description": "unauthorized Pyth price relay" + }, + { + "Error Code": 39, + "Description": "empty price attestations" + }, + { + "Error Code": 40, + "Description": "bad Stork message timestamp" + }, + { + "Error Code": 41, + "Description": "sender stork is empty" + }, + { + "Error Code": 42, + "Description": "invalid stork signature" + }, + { + "Error Code": 43, + "Description": "stork asset id not unique" + } +] diff --git a/source/json_tables/chain/errors/peggy.json b/source/json_tables/chain/errors/peggy.json new file mode 100644 index 00000000..5dada948 --- /dev/null +++ b/source/json_tables/chain/errors/peggy.json @@ -0,0 +1,62 @@ +[ + { + "Error Code": 1, + "Description": "internal" + }, + { + "Error Code": 2, + "Description": "duplicate" + }, + { + "Error Code": 3, + "Description": "invalid" + }, + { + "Error Code": 4, + "Description": "timeout" + }, + { + "Error Code": 5, + "Description": "unknown" + }, + { + "Error Code": 6, + "Description": "empty" + }, + { + "Error Code": 7, + "Description": "outdated" + }, + { + "Error Code": 8, + "Description": "unsupported" + }, + { + "Error Code": 9, + "Description": "non contiguous event nonce" + }, + { + "Error Code": 10, + "Description": "no unbatched txs found" + }, + { + "Error Code": 11, + "Description": "can not set orchestrator addresses more than once" + }, + { + "Error Code": 12, + "Description": "supply cannot exceed max ERC20 value" + }, + { + "Error Code": 13, + "Description": "invalid ethereum sender on claim" + }, + { + "Error Code": 14, + "Description": "invalid ethereum destination" + }, + { + "Error Code": 15, + "Description": "missing previous claim for validator" + } +] diff --git a/source/json_tables/chain/errors/permissions.json b/source/json_tables/chain/errors/permissions.json new file mode 100644 index 00000000..ab5f9b6b --- /dev/null +++ b/source/json_tables/chain/errors/permissions.json @@ -0,0 +1,62 @@ +[ + { + "Error Code": 2, + "Description": "attempting to create a namespace for denom that already exists" + }, + { + "Error Code": 3, + "Description": "unauthorized account" + }, + { + "Error Code": 4, + "Description": "invalid genesis" + }, + { + "Error Code": 5, + "Description": "invalid namespace" + }, + { + "Error Code": 6, + "Description": "invalid permissions" + }, + { + "Error Code": 7, + "Description": "unknown role" + }, + { + "Error Code": 8, + "Description": "unknown contract address" + }, + { + "Error Code": 9, + "Description": "restricted action" + }, + { + "Error Code": 10, + "Description": "invalid role" + }, + { + "Error Code": 11, + "Description": "namespace for denom does not exist" + }, + { + "Error Code": 12, + "Description": "wasm hook query error" + }, + { + "Error Code": 13, + "Description": "voucher was not found" + }, + { + "Error Code": 14, + "Description": "invalid contract hook" + }, + { + "Error Code": 15, + "Description": "unknown policy" + }, + { + "Error Code": 16, + "Description": "unauthorized policy change" + } +] diff --git a/source/json_tables/chain/errors/tokenfactory.json b/source/json_tables/chain/errors/tokenfactory.json new file mode 100644 index 00000000..10ef6dbe --- /dev/null +++ b/source/json_tables/chain/errors/tokenfactory.json @@ -0,0 +1,34 @@ +[ + { + "Error Code": 2, + "Description": "attempting to create a denom that already exists (has bank metadata)" + }, + { + "Error Code": 3, + "Description": "unauthorized account" + }, + { + "Error Code": 4, + "Description": "invalid denom" + }, + { + "Error Code": 5, + "Description": "invalid creator" + }, + { + "Error Code": 6, + "Description": "invalid authority metadata" + }, + { + "Error Code": 7, + "Description": "invalid genesis" + }, + { + "Error Code": 12, + "Description": "denom does not exist" + }, + { + "Error Code": 13, + "Description": "amount has to be positive" + } +] diff --git a/source/json_tables/chain/errors/wasmx.json b/source/json_tables/chain/errors/wasmx.json new file mode 100644 index 00000000..715bea0d --- /dev/null +++ b/source/json_tables/chain/errors/wasmx.json @@ -0,0 +1,46 @@ +[ + { + "Error Code": 1, + "Description": "invalid gas limit" + }, + { + "Error Code": 2, + "Description": "invalid gas price" + }, + { + "Error Code": 3, + "Description": "invalid contract address" + }, + { + "Error Code": 4, + "Description": "contract already registered" + }, + { + "Error Code": 5, + "Description": "duplicate contract" + }, + { + "Error Code": 6, + "Description": "no contract addresses found" + }, + { + "Error Code": 7, + "Description": "invalid code id" + }, + { + "Error Code": 8, + "Description": "not possible to deduct gas fees" + }, + { + "Error Code": 9, + "Description": "missing granter address" + }, + { + "Error Code": 10, + "Description": "granter address does not exist" + }, + { + "Error Code": 11, + "Description": "invalid funding mode" + } +] diff --git a/source/json_tables/chain/event.json b/source/json_tables/chain/event.json deleted file mode 100644 index 0021b714..00000000 --- a/source/json_tables/chain/event.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - {"Parameter": "type", "Type": "String", "Description": "Event type"}, - {"Parameter": "attributes", "Type": "EventAttribute Array", "Description": "All event object details"} -] \ No newline at end of file diff --git a/source/json_tables/chain/eventAttribute.json b/source/json_tables/chain/eventAttribute.json deleted file mode 100644 index 16532b1d..00000000 --- a/source/json_tables/chain/eventAttribute.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - {"Parameter": "key", "Type": "String", "Description": "Attribute key"}, - {"Parameter": "value", "Type": "String", "Description": "Attribute value"}, - {"Parameter": "index", "Type": "Boolean", "Description": "If attribute is indexed"} -] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/derivativeMarket.json b/source/json_tables/chain/exchange/derivativeMarket.json index e7deb771..dd6f9aee 100644 --- a/source/json_tables/chain/exchange/derivativeMarket.json +++ b/source/json_tables/chain/exchange/derivativeMarket.json @@ -13,9 +13,9 @@ {"Parameter": "relayer_fee_share_rate", "Type": "Decimal", "Description": "Percentage of the transaction fee shared with the relayer in a derivative market"}, {"Parameter": "is_perpetual", "Type": "Boolean", "Description": "True if the market is a perpetual market. False if the market is an expiry futures market"}, {"Parameter": "status", "Type": "MarketStatus", "Description": "Status of the market"}, - {"Parameter": "min_price_tick_size", "Type": "Decimal", "Description": "Minimum tick size that the price required for orders in the market"}, - {"Parameter": "min_quantity_tick_size", "Type": "Decimal", "Description": "Minimum tick size of the quantity required for orders in the market"}, - {"Parameter": "min_notional", "Type": "Decimal", "Description": "Minimum notional (in quote asset) required for orders in the market"}, + {"Parameter": "min_price_tick_size", "Type": "Decimal", "Description": "Minimum tick size that the price required for orders in the market (in human redable format)"}, + {"Parameter": "min_quantity_tick_size", "Type": "Decimal", "Description": "Minimum tick size of the quantity required for orders in the market (in human redable format)"}, + {"Parameter": "min_notional", "Type": "Decimal", "Description": "Minimum notional (in quote asset) required for orders in the market (in human redable format)"}, {"Parameter": "admin", "Type": "String", "Description": "Current market admin's address"}, {"Parameter": "admin_permissions", "Type": "Integer", "Description": "Level of admin permissions (the permission number is a result of adding up all individual permissions numbers)"}, {"Parameter": "quote_decimals", "Type": "Integer", "Description": "Number of decimals used for the quote token"} diff --git a/source/json_tables/chain/exchange/effectivePosition.json b/source/json_tables/chain/exchange/effectivePosition.json index 3ab83c48..d2ffb8cb 100644 --- a/source/json_tables/chain/exchange/effectivePosition.json +++ b/source/json_tables/chain/exchange/effectivePosition.json @@ -1,6 +1,6 @@ [ {"Parameter": "is_effective_position_long", "Type": "Boolean", "Description": "True if the position is long. False if the position is short"}, - {"Parameter": "quantity", "Type": "Decimal", "Description": "The position's amount"}, - {"Parameter": "entry_price", "Type": "Decimal", "Description": "The order execution price when the position was created"}, - {"Parameter": "effective_margin", "Type": "Decimal", "Description": "The position's current margin amount"} + {"Parameter": "quantity", "Type": "Decimal", "Description": "The position's amount (in human redable format)"}, + {"Parameter": "entry_price", "Type": "Decimal", "Description": "The order execution price when the position was created (in human redable format)"}, + {"Parameter": "effective_margin", "Type": "Decimal", "Description": "The position's current margin amount (in human redable format)"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/expiryFuturesMarketInfo.json b/source/json_tables/chain/exchange/expiryFuturesMarketInfo.json index 4035af81..0f60fc82 100644 --- a/source/json_tables/chain/exchange/expiryFuturesMarketInfo.json +++ b/source/json_tables/chain/exchange/expiryFuturesMarketInfo.json @@ -2,6 +2,6 @@ {"Parameter": "market_id", "Type": "String", "Description": "The market ID"}, {"Parameter": "expiration_timestamp", "Type": "Integer", "Description": "The market's expiration time in seconds"}, {"Parameter": "twap_start_timestamp", "Type": "Integer", "Description": "Defines the start time of the TWAP calculation window"}, - {"Parameter": "expiration_twap_start_price_cumulative", "Type": "Decimal", "Description": "Defines the cumulative price for the start of the TWAP window"}, - {"Parameter": "settlement_price", "Type": "Decimal", "Description": "The settlement price"} + {"Parameter": "expiration_twap_start_price_cumulative", "Type": "Decimal", "Description": "Defines the cumulative price for the start of the TWAP window (in human redable format)"}, + {"Parameter": "settlement_price", "Type": "Decimal", "Description": "The settlement price (in human redable format)"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/fullDerivativeMarket.json b/source/json_tables/chain/exchange/fullDerivativeMarket.json index a2d7fbcd..d6640205 100644 --- a/source/json_tables/chain/exchange/fullDerivativeMarket.json +++ b/source/json_tables/chain/exchange/fullDerivativeMarket.json @@ -1,6 +1,6 @@ [ {"Parameter": "market", "Type": "DerivativeMarket", "Description": "Market basic information"}, {"Parameter": "info", "Type": "PerpetualMarketState or ExpiryFuturesMarketInfo", "Description": "Specific information for the perpetual or expiry futures market"}, - {"Parameter": "mark_price", "Type": "Decimal", "Description": "The market mark price"}, + {"Parameter": "mark_price", "Type": "Decimal", "Description": "The market mark price (in human redable format)"}, {"Parameter": "mid_price_and_tob", "Type": "MidPriceAndTOB", "Description": "The mid price for this market and the best ask and bid orders"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/level.json b/source/json_tables/chain/exchange/level.json index 5ae2c063..e3088356 100644 --- a/source/json_tables/chain/exchange/level.json +++ b/source/json_tables/chain/exchange/level.json @@ -1,4 +1,4 @@ [ - {"Parameter": "p", "Type": "Decimal", "Description": "Price"}, - {"Parameter": "q", "Type": "Decimal", "Description": "Quantity"} + {"Parameter": "p", "Type": "Decimal", "Description": "Price (in human redable format)"}, + {"Parameter": "q", "Type": "Decimal", "Description": "Quantity (in human redable format)"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/marketStatus.json b/source/json_tables/chain/exchange/marketStatus.json deleted file mode 100644 index e1649da0..00000000 --- a/source/json_tables/chain/exchange/marketStatus.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - {"Code": "0", "Name": "Unspecified"}, - {"Code": "1", "Name": "Active"}, - {"Code": "2", "Name": "Paused"}, - {"Code": "3", "Name": "Demolished"}, - {"Code": "4", "Name": "Expired"} -] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/midPriceAndTOB.json b/source/json_tables/chain/exchange/midPriceAndTOB.json index 17ba2ce9..f349b3d3 100644 --- a/source/json_tables/chain/exchange/midPriceAndTOB.json +++ b/source/json_tables/chain/exchange/midPriceAndTOB.json @@ -1,5 +1,5 @@ [ - {"Parameter": "mid_price", "Type": "Decimal", "Description": "Market's mid price"}, - {"Parameter": "best_buy_price", "Type": "Decimal", "Description": "Market's best buy price"}, - {"Parameter": "best_sell_price", "Type": "Decimal", "Description": "Market's best sell price"} + {"Parameter": "mid_price", "Type": "Decimal", "Description": "Market's mid price (in human redable format)"}, + {"Parameter": "best_buy_price", "Type": "Decimal", "Description": "Market's best buy price (in human redable format)"}, + {"Parameter": "best_sell_price", "Type": "Decimal", "Description": "Market's best sell price (in human redable format)"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/perpetualMarketFunding.json b/source/json_tables/chain/exchange/perpetualMarketFunding.json index 376b13f8..8084dd53 100644 --- a/source/json_tables/chain/exchange/perpetualMarketFunding.json +++ b/source/json_tables/chain/exchange/perpetualMarketFunding.json @@ -1,5 +1,5 @@ [ {"Parameter": "cumulative_funding", "Type": "Decimal", "Description": "The market's cumulative funding"}, - {"Parameter": "cumulative_price", "Type": "Decimal", "Description": "The cumulative price for the current hour up to the last timestamp"}, + {"Parameter": "cumulative_price", "Type": "Decimal", "Description": "The cumulative price for the current hour up to the last timestamp (in human redable format)"}, {"Parameter": "last_timestamp", "Type": "Integer", "Description": "Last funding timestamp in seconds"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/queryDerivativeOrderbookResponse.json b/source/json_tables/chain/exchange/queryDerivativeOrderbookResponse.json index fb868a91..422df842 100644 --- a/source/json_tables/chain/exchange/queryDerivativeOrderbookResponse.json +++ b/source/json_tables/chain/exchange/queryDerivativeOrderbookResponse.json @@ -1,4 +1,4 @@ [ - {"Parameter": "buys_price_level", "Type": "Level Array", "Description": "Bid side entries"}, - {"Parameter": "sells_price_level", "Type": "Level Array", "Description": "Ask side entries"} + {"Parameter": "buys_price_level", "Type": "TrimmedLimitOrder Array", "Description": "Bid side entries"}, + {"Parameter": "sells_price_level", "Type": "TrimmedLimitOrder Array", "Description": "Ask side entries"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/querySpotMidPriceAndTOBResponse.json b/source/json_tables/chain/exchange/querySpotMidPriceAndTOBResponse.json index 0d3c09c8..d9a5947b 100644 --- a/source/json_tables/chain/exchange/querySpotMidPriceAndTOBResponse.json +++ b/source/json_tables/chain/exchange/querySpotMidPriceAndTOBResponse.json @@ -1,5 +1,5 @@ [ - {"Parameter": "mid_price", "Type": "Decimal", "Description": "Market's mid price"}, - {"Parameter": "best_buy_price", "Type": "Decimal", "Description": "Market's bet bid price"}, - {"Parameter": "best_sell_price", "Type": "Decimal", "Description": "Market's bet ask price"} + {"Parameter": "mid_price", "Type": "Decimal", "Description": "Market's mid price (in human redable format)"}, + {"Parameter": "best_buy_price", "Type": "Decimal", "Description": "Market's bet bid price (in human redable format)"}, + {"Parameter": "best_sell_price", "Type": "Decimal", "Description": "Market's bet ask price (in human redable format)"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/querySpotOrderbookRequest.json b/source/json_tables/chain/exchange/querySpotOrderbookRequest.json index d29a0d6b..5935f9d3 100644 --- a/source/json_tables/chain/exchange/querySpotOrderbookRequest.json +++ b/source/json_tables/chain/exchange/querySpotOrderbookRequest.json @@ -2,6 +2,6 @@ {"Parameter": "market_id", "Type": "String", "Description": "Market ID to request for", "Required": "Yes"}, {"Parameter": "limit", "Type": "Integer", "Description": "Max number of order book entries to return per side", "Required": "No"}, {"Parameter": "order_side", "Type": "OrderSide", "Description": "Specifies the side of the order book to return entries from", "Required": "No"}, - {"Parameter": "limit_cumulative_notional", "Type": "Decimal", "Description": "Limit the number of entries to return per side based on the cumulative notional", "Required": "No"}, - {"Parameter": "limit_cumulative_quantity", "Type": "Decimal", "Description": "Limit the number of entries to return per side based on the cumulative quantity", "Required": "No"} + {"Parameter": "limit_cumulative_notional", "Type": "Decimal", "Description": "Limit the number of entries to return per side based on the cumulative notional (in human redable format)", "Required": "No"}, + {"Parameter": "limit_cumulative_quantity", "Type": "Decimal", "Description": "Limit the number of entries to return per side based on the cumulative quantity (in human redable format)", "Required": "No"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/spotMarket.json b/source/json_tables/chain/exchange/spotMarket.json index 98e1906b..0c7fec11 100644 --- a/source/json_tables/chain/exchange/spotMarket.json +++ b/source/json_tables/chain/exchange/spotMarket.json @@ -7,9 +7,9 @@ {"Parameter": "relayer_fee_share_rate", "Type": "Decimal", "Description": "Percentage of the transaction fee shared with the relayer in a derivative market"}, {"Parameter": "market_id", "Type": "String", "Description": "The market ID"}, {"Parameter": "status", "Type": "MarketStatus", "Description": "Status of the market"}, - {"Parameter": "min_price_tick_size", "Type": "Decimal", "Description": "Minimum tick size that the price required for orders in the market"}, - {"Parameter": "min_quantity_tick_size", "Type": "Decimal", "Description": "Minimum tick size of the quantity required for orders in the market"}, - {"Parameter": "min_notional", "Type": "Decimal", "Description": "Minimum notional (in quote asset) required for orders in the market"}, + {"Parameter": "min_price_tick_size", "Type": "Decimal", "Description": "Minimum tick size that the price required for orders in the market (in human redable format)"}, + {"Parameter": "min_quantity_tick_size", "Type": "Decimal", "Description": "Minimum tick size of the quantity required for orders in the market (in human redable format)"}, + {"Parameter": "min_notional", "Type": "Decimal", "Description": "Minimum notional (in quote asset) required for orders in the market (in human redable format)"}, {"Parameter": "admin", "Type": "String", "Description": "Current market admin's address"}, {"Parameter": "admin_permissions", "Type": "Integer", "Description": "Level of admin permissions (the permission number is a result of adding up all individual permissions numbers)"}, {"Parameter": "base_decimals", "Type": "Integer", "Description": "Number of decimals used for the base token"}, diff --git a/source/json_tables/chain/exchange/trimmedDerivativeLimitOrder.json b/source/json_tables/chain/exchange/trimmedDerivativeLimitOrder.json index 5554b5d8..53e905c2 100644 --- a/source/json_tables/chain/exchange/trimmedDerivativeLimitOrder.json +++ b/source/json_tables/chain/exchange/trimmedDerivativeLimitOrder.json @@ -1,8 +1,8 @@ [ - {"Parameter": "price", "Type": "Decimal", "Description": "Order price"}, - {"Parameter": "quantity", "Type": "Decimal", "Description": "Order quantity"}, - {"Parameter": "margin", "Type": "Decimal", "Description": "Order margin"}, - {"Parameter": "fillable", "Type": "Decimal", "Description": "The remaining fillable amount of the order"}, + {"Parameter": "price", "Type": "Decimal", "Description": "Order price (in human redable format)"}, + {"Parameter": "quantity", "Type": "Decimal", "Description": "Order quantity (in human redable format)"}, + {"Parameter": "margin", "Type": "Decimal", "Description": "Order margin (in human redable format)"}, + {"Parameter": "fillable", "Type": "Decimal", "Description": "The remaining fillable amount of the order (in human redable format)"}, {"Parameter": "is_buy", "Type": "Boolean", "Description": "True if the order is a buy order"}, {"Parameter": "order_hash", "Type": "String", "Description": "The order hash"}, {"Parameter": "cid", "Type": "String", "Description": "The client order ID provided by the creator"} diff --git a/source/json_tables/chain/exchange/trimmedLimitOrder.json b/source/json_tables/chain/exchange/trimmedLimitOrder.json index 114196a3..adb27c01 100644 --- a/source/json_tables/chain/exchange/trimmedLimitOrder.json +++ b/source/json_tables/chain/exchange/trimmedLimitOrder.json @@ -1,6 +1,6 @@ [ - {"Parameter": "price", "Type": "Decimal", "Description": "Order price"}, - {"Parameter": "quantity", "Type": "Decimal", "Description": "Order quantity"}, + {"Parameter": "price", "Type": "Decimal", "Description": "Order price (in human redable format)"}, + {"Parameter": "quantity", "Type": "Decimal", "Description": "Order quantity (in human redable format)"}, {"Parameter": "order_hash", "Type": "String", "Description": "The order hash"}, {"Parameter": "subaccount_id", "Type": "String", "Description": "Subaccount ID that created the order"} ] \ No newline at end of file diff --git a/source/json_tables/chain/exchange/trimmedSpotLimitOrder.json b/source/json_tables/chain/exchange/trimmedSpotLimitOrder.json index 63f4e12b..14fc9e75 100644 --- a/source/json_tables/chain/exchange/trimmedSpotLimitOrder.json +++ b/source/json_tables/chain/exchange/trimmedSpotLimitOrder.json @@ -1,7 +1,7 @@ [ - {"Parameter": "price", "Type": "Decimal", "Description": "Order price"}, - {"Parameter": "quantity", "Type": "Decimal", "Description": "Order quantity"}, - {"Parameter": "fillable", "Type": "Decimal", "Description": "The remaining fillable amount of the order"}, + {"Parameter": "price", "Type": "Decimal", "Description": "Order price (in human redable format)"}, + {"Parameter": "quantity", "Type": "Decimal", "Description": "Order quantity (in human redable format)"}, + {"Parameter": "fillable", "Type": "Decimal", "Description": "The remaining fillable amount of the order (in human redable format)"}, {"Parameter": "is_buy", "Type": "Boolean", "Description": "True if the order is a buy order"}, {"Parameter": "order_hash", "Type": "String", "Description": "The order hash"}, {"Parameter": "cid", "Type": "String", "Description": "The client order ID provided by the creator"} diff --git a/source/json_tables/chain/exchange/volumeRecord.json b/source/json_tables/chain/exchange/volumeRecord.json index 5893e19f..97b0a6a1 100644 --- a/source/json_tables/chain/exchange/volumeRecord.json +++ b/source/json_tables/chain/exchange/volumeRecord.json @@ -1,4 +1,4 @@ [ - {"Parameter": "maker_volume", "Type": "Decimal", "Description": "The maker volume"}, - {"Parameter": "taker_volume", "Type": "Decimal", "Description": "The taker volume"} + {"Parameter": "maker_volume", "Type": "Decimal", "Description": "The maker volume (in human redable format)"}, + {"Parameter": "taker_volume", "Type": "Decimal", "Description": "The taker volume (in human redable format)"} ] \ No newline at end of file diff --git a/source/json_tables/chain/stringEvent.json b/source/json_tables/chain/stringEvent.json deleted file mode 100644 index 1c434757..00000000 --- a/source/json_tables/chain/stringEvent.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - {"Parameter": "type", "Type": "String", "Description": "Event type"}, - {"Parameter": "attributes", "Type": "Attribute Array", "Description": "Event data"} -] \ No newline at end of file diff --git a/source/json_tables/chain/tx/broadcastTxResponse.json b/source/json_tables/chain/tx/broadcastTxResponse.json deleted file mode 100644 index 16c05d93..00000000 --- a/source/json_tables/chain/tx/broadcastTxResponse.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - {"Paramter": "tx_response", "Type": "TxResponse", "Description": "Transaction details"} -] \ No newline at end of file diff --git a/source/json_tables/chain/txResponse.json b/source/json_tables/chain/txResponse.json deleted file mode 100644 index ab12ea7a..00000000 --- a/source/json_tables/chain/txResponse.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - {"Parameter": "height", "Type": "Integer", "Description": "The block height"}, - {"Parameter": "tx_hash", "Type": "String", "Description": "Transaction hash"}, - {"Parameter": "codespace", "Type": "String", "Description": "Namespace for the code"}, - {"Parameter": "code", "Type": "Integer", "Description": "Response code (zero for success, non-zero for errors)"}, - {"Parameter": "data", "Type": "String", "Description": "Bytes, if any"}, - {"Parameter": "raw_log", "Type": "String", "Description": "The output of the application's logger (raw string)"}, - {"Parameter": "logs", "Type": "ABCIMessageLog Array", "Description": "The output of the application's logger (typed)"}, - {"Parameter": "info", "Type": "String", "Description": "Additional information"}, - {"Parameter": "gas_wanted", "Type": "Integer", "Description": "Amount of gas requested for the transaction"}, - {"Parameter": "gas_used", "Type": "Integer", "Description": "Amount of gas consumed by the transaction"}, - {"Parameter": "tx", "Type": "Any", "Description": "The request transaction bytes"}, - {"Parameter": "timestamp", "Type": "String", "Description": "Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time"}, - {"Parameter": "events", "Type": "Event Array", "Description": "Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages."} -] \ No newline at end of file diff --git a/source/json_tables/cosmos/ABCIMessageLog.json b/source/json_tables/cosmos/ABCIMessageLog.json new file mode 100644 index 00000000..ffe6ffab --- /dev/null +++ b/source/json_tables/cosmos/ABCIMessageLog.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "msg_index", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "log", + "Type": "string", + "Description": "" + }, + { + "Parameter": "events", + "Type": "StringEvents", + "Description": "Events contains a slice of Event objects that were emitted during some execution." + } +] diff --git a/source/json_tables/cosmos/Attribute.json b/source/json_tables/cosmos/Attribute.json new file mode 100644 index 00000000..bb3e93a2 --- /dev/null +++ b/source/json_tables/cosmos/Attribute.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "key", + "Type": "string", + "Description": "" + }, + { + "Parameter": "value", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/Coin.json b/source/json_tables/cosmos/Coin.json new file mode 100644 index 00000000..5c305bd3 --- /dev/null +++ b/source/json_tables/cosmos/Coin.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/DecCoin.json b/source/json_tables/cosmos/DecCoin.json new file mode 100644 index 00000000..5d4713fa --- /dev/null +++ b/source/json_tables/cosmos/DecCoin.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/DecProto.json b/source/json_tables/cosmos/DecProto.json new file mode 100644 index 00000000..62590658 --- /dev/null +++ b/source/json_tables/cosmos/DecProto.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "dec", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/GasInfo.json b/source/json_tables/cosmos/GasInfo.json new file mode 100644 index 00000000..60c079d2 --- /dev/null +++ b/source/json_tables/cosmos/GasInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "gas_wanted", + "Type": "uint64", + "Description": "GasWanted is the maximum units of work we allow this tx to perform." + }, + { + "Parameter": "gas_used", + "Type": "uint64", + "Description": "GasUsed is the amount of gas actually consumed." + } +] diff --git a/source/json_tables/cosmos/IntProto.json b/source/json_tables/cosmos/IntProto.json new file mode 100644 index 00000000..4fae139e --- /dev/null +++ b/source/json_tables/cosmos/IntProto.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "int", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/MsgData.json b/source/json_tables/cosmos/MsgData.json new file mode 100644 index 00000000..633b2272 --- /dev/null +++ b/source/json_tables/cosmos/MsgData.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "msg_type", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/Result.json b/source/json_tables/cosmos/Result.json new file mode 100644 index 00000000..ce5ba4c2 --- /dev/null +++ b/source/json_tables/cosmos/Result.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "data", + "Type": "byte array", + "Description": "Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. Deprecated. This field is still populated, but prefer msg_response instead because it also contains the Msg response typeURL." + }, + { + "Parameter": "log", + "Type": "string", + "Description": "Log contains the log information from message or handler execution." + }, + { + "Parameter": "events", + "Type": "v1.Event array", + "Description": "Events contains a slice of Event objects that were emitted during message or handler execution." + }, + { + "Parameter": "msg_responses", + "Type": "types.Any array", + "Description": "msg_responses contains the Msg handler responses type packed in Anys. Since: cosmos-sdk 0.46" + } +] diff --git a/source/json_tables/cosmos/SearchBlocksResult.json b/source/json_tables/cosmos/SearchBlocksResult.json new file mode 100644 index 00000000..00cef17c --- /dev/null +++ b/source/json_tables/cosmos/SearchBlocksResult.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "total_count", + "Type": "int64", + "Description": "Count of all blocks" + }, + { + "Parameter": "count", + "Type": "int64", + "Description": "Count of blocks in current page" + }, + { + "Parameter": "page_number", + "Type": "int64", + "Description": "Index of current page, start from 1" + }, + { + "Parameter": "page_total", + "Type": "int64", + "Description": "Count of total pages" + }, + { + "Parameter": "limit", + "Type": "int64", + "Description": "Max count blocks per page" + }, + { + "Parameter": "blocks", + "Type": "v11.Block array", + "Description": "List of blocks in current page" + } +] diff --git a/source/json_tables/cosmos/SearchTxsResult.json b/source/json_tables/cosmos/SearchTxsResult.json new file mode 100644 index 00000000..8924074c --- /dev/null +++ b/source/json_tables/cosmos/SearchTxsResult.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "total_count", + "Type": "uint64", + "Description": "Count of all txs" + }, + { + "Parameter": "count", + "Type": "uint64", + "Description": "Count of txs in current page" + }, + { + "Parameter": "page_number", + "Type": "uint64", + "Description": "Index of current page, start from 1" + }, + { + "Parameter": "page_total", + "Type": "uint64", + "Description": "Count of total pages" + }, + { + "Parameter": "limit", + "Type": "uint64", + "Description": "Max count txs per page" + }, + { + "Parameter": "txs", + "Type": "TxResponse array", + "Description": "List of txs in current page" + } +] diff --git a/source/json_tables/cosmos/SimulationResponse.json b/source/json_tables/cosmos/SimulationResponse.json new file mode 100644 index 00000000..9e5b4c90 --- /dev/null +++ b/source/json_tables/cosmos/SimulationResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "gas_info", + "Type": "GasInfo", + "Description": "" + }, + { + "Parameter": "result", + "Type": "Result", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/StringEvent.json b/source/json_tables/cosmos/StringEvent.json new file mode 100644 index 00000000..30783f5e --- /dev/null +++ b/source/json_tables/cosmos/StringEvent.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "type", + "Type": "string", + "Description": "" + }, + { + "Parameter": "attributes", + "Type": "Attribute array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/TxMsgData.json b/source/json_tables/cosmos/TxMsgData.json new file mode 100644 index 00000000..3d378422 --- /dev/null +++ b/source/json_tables/cosmos/TxMsgData.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "data", + "Type": "MsgData array", + "Description": "data field is deprecated and not populated." + }, + { + "Parameter": "msg_responses", + "Type": "types.Any array", + "Description": "msg_responses contains the Msg handler responses packed into Anys. Since: cosmos-sdk 0.46" + } +] diff --git a/source/json_tables/cosmos/TxResponse.json b/source/json_tables/cosmos/TxResponse.json new file mode 100644 index 00000000..817973b9 --- /dev/null +++ b/source/json_tables/cosmos/TxResponse.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "The block height" + }, + { + "Parameter": "txhash", + "Type": "string", + "Description": "The transaction hash." + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "Namespace for the Code" + }, + { + "Parameter": "code", + "Type": "uint32", + "Description": "Response code." + }, + { + "Parameter": "data", + "Type": "string", + "Description": "Result bytes, if any." + }, + { + "Parameter": "raw_log", + "Type": "string", + "Description": "The output of the application's logger (raw string). May be non-deterministic." + }, + { + "Parameter": "logs", + "Type": "ABCIMessageLogs", + "Description": "The output of the application's logger (typed). May be non-deterministic." + }, + { + "Parameter": "info", + "Type": "string", + "Description": "Additional information. May be non-deterministic." + }, + { + "Parameter": "gas_wanted", + "Type": "int64", + "Description": "Amount of gas requested for transaction." + }, + { + "Parameter": "gas_used", + "Type": "int64", + "Description": "Amount of gas consumed by transaction." + }, + { + "Parameter": "tx", + "Type": "types.Any", + "Description": "The request transaction bytes." + }, + { + "Parameter": "timestamp", + "Type": "string", + "Description": "Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time." + }, + { + "Parameter": "events", + "Type": "v1.Event array", + "Description": "Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45" + } +] diff --git a/source/json_tables/cosmos/auth/AddressBytesToStringRequest.json b/source/json_tables/cosmos/auth/AddressBytesToStringRequest.json new file mode 100644 index 00000000..5e3b459e --- /dev/null +++ b/source/json_tables/cosmos/auth/AddressBytesToStringRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address_bytes", + "Type": "byte array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/auth/AddressBytesToStringResponse.json b/source/json_tables/cosmos/auth/AddressBytesToStringResponse.json new file mode 100644 index 00000000..6844b275 --- /dev/null +++ b/source/json_tables/cosmos/auth/AddressBytesToStringResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "address_string", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/AddressStringToBytesRequest.json b/source/json_tables/cosmos/auth/AddressStringToBytesRequest.json new file mode 100644 index 00000000..f6785d27 --- /dev/null +++ b/source/json_tables/cosmos/auth/AddressStringToBytesRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address_string", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/auth/AddressStringToBytesResponse.json b/source/json_tables/cosmos/auth/AddressStringToBytesResponse.json new file mode 100644 index 00000000..ad54b71a --- /dev/null +++ b/source/json_tables/cosmos/auth/AddressStringToBytesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "address_bytes", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/BaseAccount.json b/source/json_tables/cosmos/auth/BaseAccount.json new file mode 100644 index 00000000..916c3556 --- /dev/null +++ b/source/json_tables/cosmos/auth/BaseAccount.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "pub_key", + "Type": "types.Any", + "Description": "" + }, + { + "Parameter": "account_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/Bech32PrefixResponse.json b/source/json_tables/cosmos/auth/Bech32PrefixResponse.json new file mode 100644 index 00000000..43750330 --- /dev/null +++ b/source/json_tables/cosmos/auth/Bech32PrefixResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "bech32_prefix", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/GenesisState.json b/source/json_tables/cosmos/auth/GenesisState.json new file mode 100644 index 00000000..0196d027 --- /dev/null +++ b/source/json_tables/cosmos/auth/GenesisState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of the module." + }, + { + "Parameter": "accounts", + "Type": "types.Any array", + "Description": "accounts are the accounts present at genesis." + } +] diff --git a/source/json_tables/cosmos/auth/ModuleAccount.json b/source/json_tables/cosmos/auth/ModuleAccount.json new file mode 100644 index 00000000..53e3714c --- /dev/null +++ b/source/json_tables/cosmos/auth/ModuleAccount.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "" + }, + { + "Parameter": "permissions", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/ModuleCredential.json b/source/json_tables/cosmos/auth/ModuleCredential.json new file mode 100644 index 00000000..2d9caa93 --- /dev/null +++ b/source/json_tables/cosmos/auth/ModuleCredential.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "module_name", + "Type": "string", + "Description": "module_name is the name of the module used for address derivation (passed into address.Module)." + }, + { + "Parameter": "derivation_keys", + "Type": "][byte array", + "Description": "derivation_keys is for deriving a module account address (passed into address.Module) adding more keys creates sub-account addresses (passed into address.Derive)" + } +] diff --git a/source/json_tables/cosmos/auth/MsgUpdateParams.json b/source/json_tables/cosmos/auth/MsgUpdateParams.json new file mode 100644 index 00000000..0c13d1f2 --- /dev/null +++ b/source/json_tables/cosmos/auth/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the x/auth parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/auth/Params.json b/source/json_tables/cosmos/auth/Params.json new file mode 100644 index 00000000..e2e1e5c1 --- /dev/null +++ b/source/json_tables/cosmos/auth/Params.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "max_memo_characters", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "tx_sig_limit", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "tx_size_cost_per_byte", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "sig_verify_cost_ed25519", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "sig_verify_cost_secp256k1", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/QueryAccountAddressByIDRequest.json b/source/json_tables/cosmos/auth/QueryAccountAddressByIDRequest.json new file mode 100644 index 00000000..51c3f9db --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryAccountAddressByIDRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "id", + "Type": "int64", + "Description": "Deprecated, use account_id instead id is the account number of the address to be queried. This field should have been an uint64 (like all account numbers), and will be updated to uint64 in a future version of the auth query.", + "Required": "Yes" + }, + { + "Parameter": "account_id", + "Type": "uint64", + "Description": "account_id is the account number of the address to be queried. Since: cosmos-sdk 0.47", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/auth/QueryAccountAddressByIDResponse.json b/source/json_tables/cosmos/auth/QueryAccountAddressByIDResponse.json new file mode 100644 index 00000000..5766fc80 --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryAccountAddressByIDResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/QueryAccountInfoRequest.json b/source/json_tables/cosmos/auth/QueryAccountInfoRequest.json new file mode 100644 index 00000000..65de4203 --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryAccountInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the account address string.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/auth/QueryAccountInfoResponse.json b/source/json_tables/cosmos/auth/QueryAccountInfoResponse.json new file mode 100644 index 00000000..54e59cca --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryAccountInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "info", + "Type": "BaseAccount", + "Description": "info is the account info which is represented by BaseAccount." + } +] diff --git a/source/json_tables/cosmos/auth/QueryAccountRequest.json b/source/json_tables/cosmos/auth/QueryAccountRequest.json new file mode 100644 index 00000000..69ea38ee --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryAccountRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address defines the address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/auth/QueryAccountResponse.json b/source/json_tables/cosmos/auth/QueryAccountResponse.json new file mode 100644 index 00000000..d297d225 --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryAccountResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "account", + "Type": "types.Any", + "Description": "account defines the account of the corresponding address." + } +] diff --git a/source/json_tables/cosmos/auth/QueryAccountsRequest.json b/source/json_tables/cosmos/auth/QueryAccountsRequest.json new file mode 100644 index 00000000..79346d2c --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryAccountsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/auth/QueryAccountsResponse.json b/source/json_tables/cosmos/auth/QueryAccountsResponse.json new file mode 100644 index 00000000..26ad5194 --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryAccountsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "accounts", + "Type": "types.Any array", + "Description": "accounts are the existing accounts" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/auth/QueryModuleAccountByNameRequest.json b/source/json_tables/cosmos/auth/QueryModuleAccountByNameRequest.json new file mode 100644 index 00000000..b5eaf8ff --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryModuleAccountByNameRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/auth/QueryModuleAccountByNameResponse.json b/source/json_tables/cosmos/auth/QueryModuleAccountByNameResponse.json new file mode 100644 index 00000000..4332c929 --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryModuleAccountByNameResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "account", + "Type": "types.Any", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/QueryModuleAccountsResponse.json b/source/json_tables/cosmos/auth/QueryModuleAccountsResponse.json new file mode 100644 index 00000000..64342088 --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryModuleAccountsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "accounts", + "Type": "types.Any array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/auth/QueryParamsResponse.json b/source/json_tables/cosmos/auth/QueryParamsResponse.json new file mode 100644 index 00000000..27703560 --- /dev/null +++ b/source/json_tables/cosmos/auth/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + } +] diff --git a/source/json_tables/cosmos/bank/Balance.json b/source/json_tables/cosmos/bank/Balance.json new file mode 100644 index 00000000..612be8ae --- /dev/null +++ b/source/json_tables/cosmos/bank/Balance.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the address of the balance holder." + }, + { + "Parameter": "coins", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "coins defines the different coins this balance holds." + } +] diff --git a/source/json_tables/cosmos/bank/BalanceUpdate.json b/source/json_tables/cosmos/bank/BalanceUpdate.json new file mode 100644 index 00000000..56fc71d6 --- /dev/null +++ b/source/json_tables/cosmos/bank/BalanceUpdate.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "addr", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "denom", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "amt", + "Type": "cosmossdk_io_math.Int", + "Description": "the latest amount" + } +] diff --git a/source/json_tables/cosmos/bank/DenomOwner.json b/source/json_tables/cosmos/bank/DenomOwner.json new file mode 100644 index 00000000..ce0bd0dd --- /dev/null +++ b/source/json_tables/cosmos/bank/DenomOwner.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address defines the address that owns a particular denomination." + }, + { + "Parameter": "balance", + "Type": "types.Coin", + "Description": "balance is the balance of the denominated coin for an account." + } +] diff --git a/source/json_tables/cosmos/bank/DenomUnit.json b/source/json_tables/cosmos/bank/DenomUnit.json new file mode 100644 index 00000000..be93328c --- /dev/null +++ b/source/json_tables/cosmos/bank/DenomUnit.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "denom represents the string name of the given denom unit (e.g uatom)." + }, + { + "Parameter": "exponent", + "Type": "uint32", + "Description": "exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom)." + }, + { + "Parameter": "aliases", + "Type": "string array", + "Description": "aliases is a list of string aliases for the given denom" + } +] diff --git a/source/json_tables/cosmos/bank/GenesisState.json b/source/json_tables/cosmos/bank/GenesisState.json new file mode 100644 index 00000000..99f0f1e2 --- /dev/null +++ b/source/json_tables/cosmos/bank/GenesisState.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of the module." + }, + { + "Parameter": "balances", + "Type": "Balance array", + "Description": "balances is an array containing the balances of all the accounts." + }, + { + "Parameter": "supply", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "supply represents the total supply. If it is left empty, then supply will be calculated based on the provided balances. Otherwise, it will be used to validate that the sum of the balances equals this amount." + }, + { + "Parameter": "denom_metadata", + "Type": "Metadata array", + "Description": "denom_metadata defines the metadata of the different coins." + }, + { + "Parameter": "send_enabled", + "Type": "SendEnabled array", + "Description": "send_enabled defines the denoms where send is enabled or disabled. Since: cosmos-sdk 0.47" + } +] diff --git a/source/json_tables/cosmos/bank/Input.json b/source/json_tables/cosmos/bank/Input.json new file mode 100644 index 00000000..ba2357aa --- /dev/null +++ b/source/json_tables/cosmos/bank/Input.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "coins", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/bank/Metadata.json b/source/json_tables/cosmos/bank/Metadata.json new file mode 100644 index 00000000..0ef1eba7 --- /dev/null +++ b/source/json_tables/cosmos/bank/Metadata.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "denom_units", + "Type": "DenomUnit array", + "Description": "denom_units represents the list of DenomUnit's for a given coin" + }, + { + "Parameter": "base", + "Type": "string", + "Description": "base represents the base denom (should be the DenomUnit with exponent = 0)." + }, + { + "Parameter": "display", + "Type": "string", + "Description": "display indicates the suggested denom that should be displayed in clients." + }, + { + "Parameter": "name", + "Type": "string", + "Description": "name defines the name of the token (eg: Cosmos Atom) Since: cosmos-sdk 0.43" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43" + }, + { + "Parameter": "uri", + "Type": "string", + "Description": "URI to a document (on or off-chain) that contains additional information. Optional. Since: cosmos-sdk 0.46" + }, + { + "Parameter": "uri_hash", + "Type": "string", + "Description": "URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. Since: cosmos-sdk 0.46" + }, + { + "Parameter": "decimals", + "Type": "uint32", + "Description": "Decimals represent the number of decimals use to represent token amount on chain Since: cosmos-sdk 0.50" + } +] diff --git a/source/json_tables/cosmos/bank/MsgMultiSend.json b/source/json_tables/cosmos/bank/MsgMultiSend.json new file mode 100644 index 00000000..cbde8b50 --- /dev/null +++ b/source/json_tables/cosmos/bank/MsgMultiSend.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "inputs", + "Type": "Input array", + "Description": "Inputs, despite being `repeated`, only allows one sender input. This is checked in MsgMultiSend's ValidateBasic.", + "Required": "Yes" + }, + { + "Parameter": "outputs", + "Type": "Output array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/MsgSend.json b/source/json_tables/cosmos/bank/MsgSend.json new file mode 100644 index 00000000..e42e695f --- /dev/null +++ b/source/json_tables/cosmos/bank/MsgSend.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "from_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "to_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/MsgSetSendEnabled.json b/source/json_tables/cosmos/bank/MsgSetSendEnabled.json new file mode 100644 index 00000000..5747438b --- /dev/null +++ b/source/json_tables/cosmos/bank/MsgSetSendEnabled.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module.", + "Required": "Yes" + }, + { + "Parameter": "send_enabled", + "Type": "SendEnabled array", + "Description": "send_enabled is the list of entries to add or update.", + "Required": "No" + }, + { + "Parameter": "use_default_for", + "Type": "string array", + "Description": "use_default_for is a list of denoms that should use the params.default_send_enabled value. Denoms listed here will have their SendEnabled entries deleted. If a denom is included that doesn't have a SendEnabled entry, it will be ignored.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/MsgUpdateParams.json b/source/json_tables/cosmos/bank/MsgUpdateParams.json new file mode 100644 index 00000000..219aba7f --- /dev/null +++ b/source/json_tables/cosmos/bank/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the x/bank parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/Output.json b/source/json_tables/cosmos/bank/Output.json new file mode 100644 index 00000000..ba2357aa --- /dev/null +++ b/source/json_tables/cosmos/bank/Output.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "coins", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/bank/Params.json b/source/json_tables/cosmos/bank/Params.json new file mode 100644 index 00000000..6ab3635a --- /dev/null +++ b/source/json_tables/cosmos/bank/Params.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "send_enabled", + "Type": "SendEnabled array", + "Description": "Deprecated: Use of SendEnabled in params is deprecated. For genesis, use the newly added send_enabled field in the genesis object. Storage, lookup, and manipulation of this information is now in the keeper. As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files." + }, + { + "Parameter": "default_send_enabled", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/bank/QueryAllBalancesRequest.json b/source/json_tables/cosmos/bank/QueryAllBalancesRequest.json new file mode 100644 index 00000000..3b9b147d --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryAllBalancesRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the address to query balances for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + }, + { + "Parameter": "resolve_denom", + "Type": "bool", + "Description": "resolve_denom is the flag to resolve the denom into a human-readable form from the metadata. Since: cosmos-sdk 0.50", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/QueryAllBalancesResponse.json b/source/json_tables/cosmos/bank/QueryAllBalancesResponse.json new file mode 100644 index 00000000..2d030cf5 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryAllBalancesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "balances", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "balances is the balances of all the coins." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/bank/QueryBalanceRequest.json b/source/json_tables/cosmos/bank/QueryBalanceRequest.json new file mode 100644 index 00000000..65eeb006 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryBalanceRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the address to query balances for.", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "denom is the coin denom to query balances for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/QueryBalanceResponse.json b/source/json_tables/cosmos/bank/QueryBalanceResponse.json new file mode 100644 index 00000000..21b8edb1 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryBalanceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance", + "Type": "types.Coin", + "Description": "balance is the balance of the coin." + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomMetadataByQueryStringRequest.json b/source/json_tables/cosmos/bank/QueryDenomMetadataByQueryStringRequest.json new file mode 100644 index 00000000..75740786 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomMetadataByQueryStringRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "denom is the coin denom to query the metadata for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomMetadataByQueryStringResponse.json b/source/json_tables/cosmos/bank/QueryDenomMetadataByQueryStringResponse.json new file mode 100644 index 00000000..c86a0fb1 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomMetadataByQueryStringResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "metadata", + "Type": "Metadata", + "Description": "metadata describes and provides all the client information for the requested token." + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomMetadataRequest.json b/source/json_tables/cosmos/bank/QueryDenomMetadataRequest.json new file mode 100644 index 00000000..75740786 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomMetadataRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "denom is the coin denom to query the metadata for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomMetadataResponse.json b/source/json_tables/cosmos/bank/QueryDenomMetadataResponse.json new file mode 100644 index 00000000..c86a0fb1 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomMetadataResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "metadata", + "Type": "Metadata", + "Description": "metadata describes and provides all the client information for the requested token." + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomOwnersByQueryRequest.json b/source/json_tables/cosmos/bank/QueryDenomOwnersByQueryRequest.json new file mode 100644 index 00000000..5a3ab8df --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomOwnersByQueryRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "denom defines the coin denomination to query all account holders for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomOwnersByQueryResponse.json b/source/json_tables/cosmos/bank/QueryDenomOwnersByQueryResponse.json new file mode 100644 index 00000000..d9ae5182 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomOwnersByQueryResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom_owners", + "Type": "DenomOwner array", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomOwnersRequest.json b/source/json_tables/cosmos/bank/QueryDenomOwnersRequest.json new file mode 100644 index 00000000..5a3ab8df --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomOwnersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "denom defines the coin denomination to query all account holders for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomOwnersResponse.json b/source/json_tables/cosmos/bank/QueryDenomOwnersResponse.json new file mode 100644 index 00000000..d9ae5182 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomOwnersResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom_owners", + "Type": "DenomOwner array", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomsMetadataRequest.json b/source/json_tables/cosmos/bank/QueryDenomsMetadataRequest.json new file mode 100644 index 00000000..79346d2c --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomsMetadataRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/bank/QueryDenomsMetadataResponse.json b/source/json_tables/cosmos/bank/QueryDenomsMetadataResponse.json new file mode 100644 index 00000000..72bd7edd --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryDenomsMetadataResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "metadatas", + "Type": "Metadata array", + "Description": "metadata provides the client information for all the registered tokens." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/bank/QueryParamsResponse.json b/source/json_tables/cosmos/bank/QueryParamsResponse.json new file mode 100644 index 00000000..a33f536c --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params provides the parameters of the bank module." + } +] diff --git a/source/json_tables/cosmos/bank/QuerySendEnabledRequest.json b/source/json_tables/cosmos/bank/QuerySendEnabledRequest.json new file mode 100644 index 00000000..b851b573 --- /dev/null +++ b/source/json_tables/cosmos/bank/QuerySendEnabledRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "denoms", + "Type": "string array", + "Description": "denoms is the specific denoms you want look up. Leave empty to get all entries.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request. This field is only read if the denoms field is empty.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/bank/QuerySendEnabledResponse.json b/source/json_tables/cosmos/bank/QuerySendEnabledResponse.json new file mode 100644 index 00000000..3b4d5e38 --- /dev/null +++ b/source/json_tables/cosmos/bank/QuerySendEnabledResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "send_enabled", + "Type": "SendEnabled array", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response. This field is only populated if the denoms field in the request is empty." + } +] diff --git a/source/json_tables/cosmos/bank/QuerySpendableBalanceByDenomRequest.json b/source/json_tables/cosmos/bank/QuerySpendableBalanceByDenomRequest.json new file mode 100644 index 00000000..65eeb006 --- /dev/null +++ b/source/json_tables/cosmos/bank/QuerySpendableBalanceByDenomRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the address to query balances for.", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "denom is the coin denom to query balances for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/QuerySpendableBalanceByDenomResponse.json b/source/json_tables/cosmos/bank/QuerySpendableBalanceByDenomResponse.json new file mode 100644 index 00000000..21b8edb1 --- /dev/null +++ b/source/json_tables/cosmos/bank/QuerySpendableBalanceByDenomResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance", + "Type": "types.Coin", + "Description": "balance is the balance of the coin." + } +] diff --git a/source/json_tables/cosmos/bank/QuerySpendableBalancesRequest.json b/source/json_tables/cosmos/bank/QuerySpendableBalancesRequest.json new file mode 100644 index 00000000..9dbc74cb --- /dev/null +++ b/source/json_tables/cosmos/bank/QuerySpendableBalancesRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the address to query spendable balances for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/bank/QuerySpendableBalancesResponse.json b/source/json_tables/cosmos/bank/QuerySpendableBalancesResponse.json new file mode 100644 index 00000000..41f78671 --- /dev/null +++ b/source/json_tables/cosmos/bank/QuerySpendableBalancesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "balances", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "balances is the spendable balances of all the coins." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/bank/QuerySupplyOfRequest.json b/source/json_tables/cosmos/bank/QuerySupplyOfRequest.json new file mode 100644 index 00000000..9355148d --- /dev/null +++ b/source/json_tables/cosmos/bank/QuerySupplyOfRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "denom is the coin denom to query balances for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/bank/QuerySupplyOfResponse.json b/source/json_tables/cosmos/bank/QuerySupplyOfResponse.json new file mode 100644 index 00000000..2586ded0 --- /dev/null +++ b/source/json_tables/cosmos/bank/QuerySupplyOfResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "amount is the supply of the coin." + } +] diff --git a/source/json_tables/cosmos/bank/QueryTotalSupplyRequest.json b/source/json_tables/cosmos/bank/QueryTotalSupplyRequest.json new file mode 100644 index 00000000..7b29a285 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryTotalSupplyRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request. Since: cosmos-sdk 0.43", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/bank/QueryTotalSupplyResponse.json b/source/json_tables/cosmos/bank/QueryTotalSupplyResponse.json new file mode 100644 index 00000000..c56beb38 --- /dev/null +++ b/source/json_tables/cosmos/bank/QueryTotalSupplyResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "supply", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "supply is the supply of the coins" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response. Since: cosmos-sdk 0.43" + } +] diff --git a/source/json_tables/cosmos/bank/SendAuthorization.json b/source/json_tables/cosmos/bank/SendAuthorization.json new file mode 100644 index 00000000..baaaea3c --- /dev/null +++ b/source/json_tables/cosmos/bank/SendAuthorization.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "spend_limit", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + }, + { + "Parameter": "allow_list", + "Type": "string array", + "Description": "allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the granter. If omitted, any recipient is allowed. Since: cosmos-sdk 0.47" + } +] diff --git a/source/json_tables/cosmos/bank/SendEnabled.json b/source/json_tables/cosmos/bank/SendEnabled.json new file mode 100644 index 00000000..ae06ace8 --- /dev/null +++ b/source/json_tables/cosmos/bank/SendEnabled.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "enabled", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/bank/Supply.json b/source/json_tables/cosmos/bank/Supply.json new file mode 100644 index 00000000..acb881c2 --- /dev/null +++ b/source/json_tables/cosmos/bank/Supply.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "total", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/circuit/AccountResponse.json b/source/json_tables/cosmos/circuit/AccountResponse.json new file mode 100644 index 00000000..3a99eacc --- /dev/null +++ b/source/json_tables/cosmos/circuit/AccountResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "permission", + "Type": "Permissions", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/circuit/AccountsResponse.json b/source/json_tables/cosmos/circuit/AccountsResponse.json new file mode 100644 index 00000000..f6a0b912 --- /dev/null +++ b/source/json_tables/cosmos/circuit/AccountsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "accounts", + "Type": "GenesisAccountPermissions array", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/circuit/DisabledListResponse.json b/source/json_tables/cosmos/circuit/DisabledListResponse.json new file mode 100644 index 00000000..93c13dbd --- /dev/null +++ b/source/json_tables/cosmos/circuit/DisabledListResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "disabled_list", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/circuit/GenesisAccountPermissions.json b/source/json_tables/cosmos/circuit/GenesisAccountPermissions.json new file mode 100644 index 00000000..ba610886 --- /dev/null +++ b/source/json_tables/cosmos/circuit/GenesisAccountPermissions.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "permissions", + "Type": "Permissions", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/circuit/GenesisState.json b/source/json_tables/cosmos/circuit/GenesisState.json new file mode 100644 index 00000000..63049835 --- /dev/null +++ b/source/json_tables/cosmos/circuit/GenesisState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account_permissions", + "Type": "GenesisAccountPermissions array", + "Description": "" + }, + { + "Parameter": "disabled_type_urls", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/circuit/MsgAuthorizeCircuitBreaker.json b/source/json_tables/cosmos/circuit/MsgAuthorizeCircuitBreaker.json new file mode 100644 index 00000000..bc736ed1 --- /dev/null +++ b/source/json_tables/cosmos/circuit/MsgAuthorizeCircuitBreaker.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "granter is the granter of the circuit breaker permissions and must have LEVEL_SUPER_ADMIN.", + "Required": "Yes" + }, + { + "Parameter": "grantee", + "Type": "string", + "Description": "grantee is the account authorized with the provided permissions.", + "Required": "Yes" + }, + { + "Parameter": "permissions", + "Type": "Permissions", + "Description": "permissions are the circuit breaker permissions that the grantee receives. These will overwrite any existing permissions. LEVEL_NONE_UNSPECIFIED can be specified to revoke all permissions.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/circuit/MsgAuthorizeCircuitBreakerResponse.json b/source/json_tables/cosmos/circuit/MsgAuthorizeCircuitBreakerResponse.json new file mode 100644 index 00000000..062888f3 --- /dev/null +++ b/source/json_tables/cosmos/circuit/MsgAuthorizeCircuitBreakerResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/circuit/MsgResetCircuitBreaker.json b/source/json_tables/cosmos/circuit/MsgResetCircuitBreaker.json new file mode 100644 index 00000000..6efa14b9 --- /dev/null +++ b/source/json_tables/cosmos/circuit/MsgResetCircuitBreaker.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the account authorized to trip or reset the circuit breaker.", + "Required": "Yes" + }, + { + "Parameter": "msg_type_urls", + "Type": "string array", + "Description": "msg_type_urls specifies a list of Msg type URLs to resume processing. If it is left empty all Msg processing for type URLs that the account is authorized to trip will resume.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/circuit/MsgResetCircuitBreakerResponse.json b/source/json_tables/cosmos/circuit/MsgResetCircuitBreakerResponse.json new file mode 100644 index 00000000..062888f3 --- /dev/null +++ b/source/json_tables/cosmos/circuit/MsgResetCircuitBreakerResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/circuit/MsgTripCircuitBreaker.json b/source/json_tables/cosmos/circuit/MsgTripCircuitBreaker.json new file mode 100644 index 00000000..4013755a --- /dev/null +++ b/source/json_tables/cosmos/circuit/MsgTripCircuitBreaker.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the account authorized to trip the circuit breaker.", + "Required": "Yes" + }, + { + "Parameter": "msg_type_urls", + "Type": "string array", + "Description": "msg_type_urls specifies a list of type URLs to immediately stop processing. IF IT IS LEFT EMPTY, ALL MSG PROCESSING WILL STOP IMMEDIATELY. This value is validated against the authority's permissions and if the authority does not have permissions to trip the specified msg type URLs (or all URLs), the operation will fail.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/circuit/MsgTripCircuitBreakerResponse.json b/source/json_tables/cosmos/circuit/MsgTripCircuitBreakerResponse.json new file mode 100644 index 00000000..062888f3 --- /dev/null +++ b/source/json_tables/cosmos/circuit/MsgTripCircuitBreakerResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/circuit/Permissions.json b/source/json_tables/cosmos/circuit/Permissions.json new file mode 100644 index 00000000..0a36863f --- /dev/null +++ b/source/json_tables/cosmos/circuit/Permissions.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "level", + "Type": "Permissions_Level", + "Description": "level is the level of permissions granted to this account." + }, + { + "Parameter": "limit_type_urls", + "Type": "string array", + "Description": "limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS." + } +] diff --git a/source/json_tables/cosmos/circuit/QueryAccountRequest.json b/source/json_tables/cosmos/circuit/QueryAccountRequest.json new file mode 100644 index 00000000..4b3e99c1 --- /dev/null +++ b/source/json_tables/cosmos/circuit/QueryAccountRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/circuit/QueryAccountsRequest.json b/source/json_tables/cosmos/circuit/QueryAccountsRequest.json new file mode 100644 index 00000000..79346d2c --- /dev/null +++ b/source/json_tables/cosmos/circuit/QueryAccountsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/circuit/v1/Level.json b/source/json_tables/cosmos/circuit/v1/Level.json new file mode 100644 index 00000000..ca8cfb5d --- /dev/null +++ b/source/json_tables/cosmos/circuit/v1/Level.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "LEVEL_NONE_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "LEVEL_SOME_MSGS" + }, + { + "Code": "2", + "Name": "LEVEL_ALL_MSGS" + }, + { + "Code": "3", + "Name": "LEVEL_SUPER_ADMIN" + } +] diff --git a/source/json_tables/cosmos/consensus/MsgUpdateParams.json b/source/json_tables/cosmos/consensus/MsgUpdateParams.json new file mode 100644 index 00000000..f91830b9 --- /dev/null +++ b/source/json_tables/cosmos/consensus/MsgUpdateParams.json @@ -0,0 +1,44 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "block", + "Type": "v1.BlockParams", + "Description": "params defines the x/consensus parameters to update. VersionsParams is not included in this Msg because it is tracked separarately in x/upgrade. NOTE: All parameters must be supplied.", + "Required": "No" + }, + { + "Parameter": "evidence", + "Type": "v1.EvidenceParams", + "Description": "", + "Required": "No" + }, + { + "Parameter": "validator", + "Type": "v1.ValidatorParams", + "Description": "", + "Required": "No" + }, + { + "Parameter": "abci", + "Type": "v1.ABCIParams", + "Description": "Since: cosmos-sdk 0.50", + "Required": "No" + }, + { + "Parameter": "synchrony", + "Type": "v1.SynchronyParams", + "Description": "", + "Required": "No" + }, + { + "Parameter": "feature", + "Type": "v1.FeatureParams", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/consensus/QueryParamsResponse.json b/source/json_tables/cosmos/consensus/QueryParamsResponse.json new file mode 100644 index 00000000..7d7003d2 --- /dev/null +++ b/source/json_tables/cosmos/consensus/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "v1.ConsensusParams", + "Description": "params are the tendermint consensus params stored in the consensus module. Please note that `params.version` is not populated in this response, it is tracked separately in the x/upgrade module." + } +] diff --git a/source/json_tables/cosmos/crisis/GenesisState.json b/source/json_tables/cosmos/crisis/GenesisState.json new file mode 100644 index 00000000..f3a578e7 --- /dev/null +++ b/source/json_tables/cosmos/crisis/GenesisState.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "constant_fee", + "Type": "types.Coin", + "Description": "constant_fee is the fee used to verify the invariant in the crisis module." + } +] diff --git a/source/json_tables/cosmos/crisis/MsgUpdateParams.json b/source/json_tables/cosmos/crisis/MsgUpdateParams.json new file mode 100644 index 00000000..5acacec8 --- /dev/null +++ b/source/json_tables/cosmos/crisis/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "constant_fee", + "Type": "types.Coin", + "Description": "constant_fee defines the x/crisis parameter.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/crisis/MsgVerifyInvariant.json b/source/json_tables/cosmos/crisis/MsgVerifyInvariant.json new file mode 100644 index 00000000..c4904335 --- /dev/null +++ b/source/json_tables/cosmos/crisis/MsgVerifyInvariant.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "sender is the account address of private key to send coins to fee collector account.", + "Required": "Yes" + }, + { + "Parameter": "invariant_module_name", + "Type": "string", + "Description": "name of the invariant module.", + "Required": "Yes" + }, + { + "Parameter": "invariant_route", + "Type": "string", + "Description": "invariant_route is the msg's invariant route.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/CommunityPoolSpendProposal.json b/source/json_tables/cosmos/distribution/CommunityPoolSpendProposal.json new file mode 100644 index 00000000..c6ada133 --- /dev/null +++ b/source/json_tables/cosmos/distribution/CommunityPoolSpendProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "recipient", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/CommunityPoolSpendProposalWithDeposit.json b/source/json_tables/cosmos/distribution/CommunityPoolSpendProposalWithDeposit.json new file mode 100644 index 00000000..68685b7b --- /dev/null +++ b/source/json_tables/cosmos/distribution/CommunityPoolSpendProposalWithDeposit.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "recipient", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "deposit", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/DelegationDelegatorReward.json b/source/json_tables/cosmos/distribution/DelegationDelegatorReward.json new file mode 100644 index 00000000..f0f3fc5e --- /dev/null +++ b/source/json_tables/cosmos/distribution/DelegationDelegatorReward.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "reward", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/DelegatorStartingInfo.json b/source/json_tables/cosmos/distribution/DelegatorStartingInfo.json new file mode 100644 index 00000000..5afa29e5 --- /dev/null +++ b/source/json_tables/cosmos/distribution/DelegatorStartingInfo.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "previous_period", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "stake", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "height", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/DelegatorStartingInfoRecord.json b/source/json_tables/cosmos/distribution/DelegatorStartingInfoRecord.json new file mode 100644 index 00000000..95605863 --- /dev/null +++ b/source/json_tables/cosmos/distribution/DelegatorStartingInfoRecord.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address is the address of the delegator." + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address is the address of the validator." + }, + { + "Parameter": "starting_info", + "Type": "DelegatorStartingInfo", + "Description": "starting_info defines the starting info of a delegator." + } +] diff --git a/source/json_tables/cosmos/distribution/DelegatorWithdrawInfo.json b/source/json_tables/cosmos/distribution/DelegatorWithdrawInfo.json new file mode 100644 index 00000000..611a2391 --- /dev/null +++ b/source/json_tables/cosmos/distribution/DelegatorWithdrawInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address is the address of the delegator." + }, + { + "Parameter": "withdraw_address", + "Type": "string", + "Description": "withdraw_address is the address to withdraw the delegation rewards to." + } +] diff --git a/source/json_tables/cosmos/distribution/FeePool.json b/source/json_tables/cosmos/distribution/FeePool.json new file mode 100644 index 00000000..5d2d20a3 --- /dev/null +++ b/source/json_tables/cosmos/distribution/FeePool.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "community_pool", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/GenesisState.json b/source/json_tables/cosmos/distribution/GenesisState.json new file mode 100644 index 00000000..2535e937 --- /dev/null +++ b/source/json_tables/cosmos/distribution/GenesisState.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of the module." + }, + { + "Parameter": "fee_pool", + "Type": "FeePool", + "Description": "fee_pool defines the fee pool at genesis." + }, + { + "Parameter": "delegator_withdraw_infos", + "Type": "DelegatorWithdrawInfo array", + "Description": "fee_pool defines the delegator withdraw infos at genesis." + }, + { + "Parameter": "previous_proposer", + "Type": "string", + "Description": "fee_pool defines the previous proposer at genesis." + }, + { + "Parameter": "outstanding_rewards", + "Type": "ValidatorOutstandingRewardsRecord array", + "Description": "fee_pool defines the outstanding rewards of all validators at genesis." + }, + { + "Parameter": "validator_accumulated_commissions", + "Type": "ValidatorAccumulatedCommissionRecord array", + "Description": "fee_pool defines the accumulated commissions of all validators at genesis." + }, + { + "Parameter": "validator_historical_rewards", + "Type": "ValidatorHistoricalRewardsRecord array", + "Description": "fee_pool defines the historical rewards of all validators at genesis." + }, + { + "Parameter": "validator_current_rewards", + "Type": "ValidatorCurrentRewardsRecord array", + "Description": "fee_pool defines the current rewards of all validators at genesis." + }, + { + "Parameter": "delegator_starting_infos", + "Type": "DelegatorStartingInfoRecord array", + "Description": "fee_pool defines the delegator starting infos at genesis." + }, + { + "Parameter": "validator_slash_events", + "Type": "ValidatorSlashEventRecord array", + "Description": "fee_pool defines the validator slash events at genesis." + } +] diff --git a/source/json_tables/cosmos/distribution/MsgCommunityPoolSpend.json b/source/json_tables/cosmos/distribution/MsgCommunityPoolSpend.json new file mode 100644 index 00000000..0cc2fecc --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgCommunityPoolSpend.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "recipient", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/MsgDepositValidatorRewardsPool.json b/source/json_tables/cosmos/distribution/MsgDepositValidatorRewardsPool.json new file mode 100644 index 00000000..1f7f31a1 --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgDepositValidatorRewardsPool.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "depositor", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/MsgFundCommunityPool.json b/source/json_tables/cosmos/distribution/MsgFundCommunityPool.json new file mode 100644 index 00000000..10269015 --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgFundCommunityPool.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/MsgSetWithdrawAddress.json b/source/json_tables/cosmos/distribution/MsgSetWithdrawAddress.json new file mode 100644 index 00000000..23fea6b3 --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgSetWithdrawAddress.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "withdraw_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/MsgUpdateParams.json b/source/json_tables/cosmos/distribution/MsgUpdateParams.json new file mode 100644 index 00000000..2614885a --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the x/distribution parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/MsgWithdrawDelegatorReward.json b/source/json_tables/cosmos/distribution/MsgWithdrawDelegatorReward.json new file mode 100644 index 00000000..a547b2cb --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgWithdrawDelegatorReward.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/MsgWithdrawDelegatorRewardResponse.json b/source/json_tables/cosmos/distribution/MsgWithdrawDelegatorRewardResponse.json new file mode 100644 index 00000000..99909156 --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgWithdrawDelegatorRewardResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "Since: cosmos-sdk 0.46" + } +] diff --git a/source/json_tables/cosmos/distribution/MsgWithdrawValidatorCommission.json b/source/json_tables/cosmos/distribution/MsgWithdrawValidatorCommission.json new file mode 100644 index 00000000..7e29a239 --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgWithdrawValidatorCommission.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/MsgWithdrawValidatorCommissionResponse.json b/source/json_tables/cosmos/distribution/MsgWithdrawValidatorCommissionResponse.json new file mode 100644 index 00000000..99909156 --- /dev/null +++ b/source/json_tables/cosmos/distribution/MsgWithdrawValidatorCommissionResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "Since: cosmos-sdk 0.46" + } +] diff --git a/source/json_tables/cosmos/distribution/Params.json b/source/json_tables/cosmos/distribution/Params.json new file mode 100644 index 00000000..f56d444d --- /dev/null +++ b/source/json_tables/cosmos/distribution/Params.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "community_tax", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "base_proposer_reward", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "Deprecated: The base_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism." + }, + { + "Parameter": "bonus_proposer_reward", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "Deprecated: The bonus_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism." + }, + { + "Parameter": "withdraw_addr_enabled", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryCommunityPoolResponse.json b/source/json_tables/cosmos/distribution/QueryCommunityPoolResponse.json new file mode 100644 index 00000000..a6fdb476 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryCommunityPoolResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "pool", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "pool defines community pool's coins." + } +] diff --git a/source/json_tables/cosmos/distribution/QueryDelegationRewardsRequest.json b/source/json_tables/cosmos/distribution/QueryDelegationRewardsRequest.json new file mode 100644 index 00000000..9029be8c --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryDelegationRewardsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address defines the delegator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address defines the validator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryDelegationRewardsResponse.json b/source/json_tables/cosmos/distribution/QueryDelegationRewardsResponse.json new file mode 100644 index 00000000..41f148c7 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryDelegationRewardsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "rewards defines the rewards accrued by a delegation." + } +] diff --git a/source/json_tables/cosmos/distribution/QueryDelegationTotalRewardsRequest.json b/source/json_tables/cosmos/distribution/QueryDelegationTotalRewardsRequest.json new file mode 100644 index 00000000..1fe609e7 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryDelegationTotalRewardsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address defines the delegator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryDelegationTotalRewardsResponse.json b/source/json_tables/cosmos/distribution/QueryDelegationTotalRewardsResponse.json new file mode 100644 index 00000000..fa9df839 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryDelegationTotalRewardsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "rewards", + "Type": "DelegationDelegatorReward array", + "Description": "rewards defines all the rewards accrued by a delegator." + }, + { + "Parameter": "total", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "total defines the sum of all the rewards." + } +] diff --git a/source/json_tables/cosmos/distribution/QueryDelegatorValidatorsRequest.json b/source/json_tables/cosmos/distribution/QueryDelegatorValidatorsRequest.json new file mode 100644 index 00000000..1fe609e7 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryDelegatorValidatorsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address defines the delegator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryDelegatorValidatorsResponse.json b/source/json_tables/cosmos/distribution/QueryDelegatorValidatorsResponse.json new file mode 100644 index 00000000..e00c57b9 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryDelegatorValidatorsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "validators", + "Type": "string array", + "Description": "validators defines the validators a delegator is delegating for." + } +] diff --git a/source/json_tables/cosmos/distribution/QueryDelegatorWithdrawAddressRequest.json b/source/json_tables/cosmos/distribution/QueryDelegatorWithdrawAddressRequest.json new file mode 100644 index 00000000..1fe609e7 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryDelegatorWithdrawAddressRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address defines the delegator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryDelegatorWithdrawAddressResponse.json b/source/json_tables/cosmos/distribution/QueryDelegatorWithdrawAddressResponse.json new file mode 100644 index 00000000..805b1f33 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryDelegatorWithdrawAddressResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "withdraw_address", + "Type": "string", + "Description": "withdraw_address defines the delegator address to query for." + } +] diff --git a/source/json_tables/cosmos/distribution/QueryParamsResponse.json b/source/json_tables/cosmos/distribution/QueryParamsResponse.json new file mode 100644 index 00000000..27703560 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + } +] diff --git a/source/json_tables/cosmos/distribution/QueryValidatorCommissionRequest.json b/source/json_tables/cosmos/distribution/QueryValidatorCommissionRequest.json new file mode 100644 index 00000000..d535e313 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryValidatorCommissionRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address defines the validator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryValidatorCommissionResponse.json b/source/json_tables/cosmos/distribution/QueryValidatorCommissionResponse.json new file mode 100644 index 00000000..8b8a3517 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryValidatorCommissionResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "commission", + "Type": "ValidatorAccumulatedCommission", + "Description": "commission defines the commission the validator received." + } +] diff --git a/source/json_tables/cosmos/distribution/QueryValidatorDistributionInfoRequest.json b/source/json_tables/cosmos/distribution/QueryValidatorDistributionInfoRequest.json new file mode 100644 index 00000000..d535e313 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryValidatorDistributionInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address defines the validator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryValidatorDistributionInfoResponse.json b/source/json_tables/cosmos/distribution/QueryValidatorDistributionInfoResponse.json new file mode 100644 index 00000000..aaf60f24 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryValidatorDistributionInfoResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "operator_address", + "Type": "string", + "Description": "operator_address defines the validator operator address." + }, + { + "Parameter": "self_bond_rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "self_bond_rewards defines the self delegations rewards." + }, + { + "Parameter": "commission", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "commission defines the commission the validator received." + } +] diff --git a/source/json_tables/cosmos/distribution/QueryValidatorOutstandingRewardsRequest.json b/source/json_tables/cosmos/distribution/QueryValidatorOutstandingRewardsRequest.json new file mode 100644 index 00000000..d535e313 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryValidatorOutstandingRewardsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address defines the validator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryValidatorOutstandingRewardsResponse.json b/source/json_tables/cosmos/distribution/QueryValidatorOutstandingRewardsResponse.json new file mode 100644 index 00000000..bd13f164 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryValidatorOutstandingRewardsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "rewards", + "Type": "ValidatorOutstandingRewards", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryValidatorSlashesRequest.json b/source/json_tables/cosmos/distribution/QueryValidatorSlashesRequest.json new file mode 100644 index 00000000..d8d96e12 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryValidatorSlashesRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address defines the validator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "starting_height", + "Type": "uint64", + "Description": "starting_height defines the optional starting height to query the slashes.", + "Required": "No" + }, + { + "Parameter": "ending_height", + "Type": "uint64", + "Description": "starting_height defines the optional ending height to query the slashes.", + "Required": "No" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/distribution/QueryValidatorSlashesResponse.json b/source/json_tables/cosmos/distribution/QueryValidatorSlashesResponse.json new file mode 100644 index 00000000..14f9d376 --- /dev/null +++ b/source/json_tables/cosmos/distribution/QueryValidatorSlashesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "slashes", + "Type": "ValidatorSlashEvent array", + "Description": "slashes defines the slashes the validator received." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorAccumulatedCommission.json b/source/json_tables/cosmos/distribution/ValidatorAccumulatedCommission.json new file mode 100644 index 00000000..279847d8 --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorAccumulatedCommission.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "commission", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorAccumulatedCommissionRecord.json b/source/json_tables/cosmos/distribution/ValidatorAccumulatedCommissionRecord.json new file mode 100644 index 00000000..fcc65d38 --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorAccumulatedCommissionRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address is the address of the validator." + }, + { + "Parameter": "accumulated", + "Type": "ValidatorAccumulatedCommission", + "Description": "accumulated is the accumulated commission of a validator." + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorCurrentRewards.json b/source/json_tables/cosmos/distribution/ValidatorCurrentRewards.json new file mode 100644 index 00000000..2b292c3e --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorCurrentRewards.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "" + }, + { + "Parameter": "period", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorCurrentRewardsRecord.json b/source/json_tables/cosmos/distribution/ValidatorCurrentRewardsRecord.json new file mode 100644 index 00000000..b4f8d27c --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorCurrentRewardsRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address is the address of the validator." + }, + { + "Parameter": "rewards", + "Type": "ValidatorCurrentRewards", + "Description": "rewards defines the current rewards of a validator." + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorHistoricalRewards.json b/source/json_tables/cosmos/distribution/ValidatorHistoricalRewards.json new file mode 100644 index 00000000..75af3693 --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorHistoricalRewards.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "cumulative_reward_ratio", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "" + }, + { + "Parameter": "reference_count", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorHistoricalRewardsRecord.json b/source/json_tables/cosmos/distribution/ValidatorHistoricalRewardsRecord.json new file mode 100644 index 00000000..5fcec057 --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorHistoricalRewardsRecord.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address is the address of the validator." + }, + { + "Parameter": "period", + "Type": "uint64", + "Description": "period defines the period the historical rewards apply to." + }, + { + "Parameter": "rewards", + "Type": "ValidatorHistoricalRewards", + "Description": "rewards defines the historical rewards of a validator." + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorOutstandingRewards.json b/source/json_tables/cosmos/distribution/ValidatorOutstandingRewards.json new file mode 100644 index 00000000..0dc66fa5 --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorOutstandingRewards.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorOutstandingRewardsRecord.json b/source/json_tables/cosmos/distribution/ValidatorOutstandingRewardsRecord.json new file mode 100644 index 00000000..d5582485 --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorOutstandingRewardsRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address is the address of the validator." + }, + { + "Parameter": "outstanding_rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.DecCoins", + "Description": "outstanding_rewards represents the outstanding rewards of a validator." + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorSlashEvent.json b/source/json_tables/cosmos/distribution/ValidatorSlashEvent.json new file mode 100644 index 00000000..7fb32d56 --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorSlashEvent.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validator_period", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "fraction", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorSlashEventRecord.json b/source/json_tables/cosmos/distribution/ValidatorSlashEventRecord.json new file mode 100644 index 00000000..f771aa4a --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorSlashEventRecord.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address is the address of the validator." + }, + { + "Parameter": "height", + "Type": "uint64", + "Description": "height defines the block height at which the slash event occurred." + }, + { + "Parameter": "period", + "Type": "uint64", + "Description": "period is the period of the slash event." + }, + { + "Parameter": "validator_slash_event", + "Type": "ValidatorSlashEvent", + "Description": "validator_slash_event describes the slash event." + } +] diff --git a/source/json_tables/cosmos/distribution/ValidatorSlashEvents.json b/source/json_tables/cosmos/distribution/ValidatorSlashEvents.json new file mode 100644 index 00000000..5182f82e --- /dev/null +++ b/source/json_tables/cosmos/distribution/ValidatorSlashEvents.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "validator_slash_events", + "Type": "ValidatorSlashEvent array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/evidence/Equivocation.json b/source/json_tables/cosmos/evidence/Equivocation.json new file mode 100644 index 00000000..1538d02b --- /dev/null +++ b/source/json_tables/cosmos/evidence/Equivocation.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "height is the equivocation height." + }, + { + "Parameter": "time", + "Type": "time.Time", + "Description": "time is the equivocation time." + }, + { + "Parameter": "power", + "Type": "int64", + "Description": "power is the equivocation validator power." + }, + { + "Parameter": "consensus_address", + "Type": "string", + "Description": "consensus_address is the equivocation validator consensus address." + } +] diff --git a/source/json_tables/cosmos/evidence/GenesisState.json b/source/json_tables/cosmos/evidence/GenesisState.json new file mode 100644 index 00000000..db4420cf --- /dev/null +++ b/source/json_tables/cosmos/evidence/GenesisState.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "evidence", + "Type": "types.Any array", + "Description": "evidence defines all the evidence at genesis." + } +] diff --git a/source/json_tables/cosmos/evidence/MsgSubmitEvidence.json b/source/json_tables/cosmos/evidence/MsgSubmitEvidence.json new file mode 100644 index 00000000..311217fd --- /dev/null +++ b/source/json_tables/cosmos/evidence/MsgSubmitEvidence.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "submitter", + "Type": "string", + "Description": "submitter is the signer account address of evidence.", + "Required": "Yes" + }, + { + "Parameter": "evidence", + "Type": "types.Any", + "Description": "evidence defines the evidence of misbehavior.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/evidence/MsgSubmitEvidenceResponse.json b/source/json_tables/cosmos/evidence/MsgSubmitEvidenceResponse.json new file mode 100644 index 00000000..8eff40d6 --- /dev/null +++ b/source/json_tables/cosmos/evidence/MsgSubmitEvidenceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "hash", + "Type": "byte array", + "Description": "hash defines the hash of the evidence." + } +] diff --git a/source/json_tables/cosmos/evidence/QueryAllEvidenceRequest.json b/source/json_tables/cosmos/evidence/QueryAllEvidenceRequest.json new file mode 100644 index 00000000..79346d2c --- /dev/null +++ b/source/json_tables/cosmos/evidence/QueryAllEvidenceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/evidence/QueryAllEvidenceResponse.json b/source/json_tables/cosmos/evidence/QueryAllEvidenceResponse.json new file mode 100644 index 00000000..19f9a7ea --- /dev/null +++ b/source/json_tables/cosmos/evidence/QueryAllEvidenceResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "evidence", + "Type": "types.Any array", + "Description": "evidence returns all evidences." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/evidence/QueryEvidenceRequest.json b/source/json_tables/cosmos/evidence/QueryEvidenceRequest.json new file mode 100644 index 00000000..a6932e94 --- /dev/null +++ b/source/json_tables/cosmos/evidence/QueryEvidenceRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "evidence_hash", + "Type": "byte array", + "Description": "evidence_hash defines the hash of the requested evidence. Deprecated: Use hash, a HEX encoded string, instead.", + "Required": "Yes" + }, + { + "Parameter": "hash", + "Type": "string", + "Description": "hash defines the evidence hash of the requested evidence. Since: cosmos-sdk 0.47", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/evidence/QueryEvidenceResponse.json b/source/json_tables/cosmos/evidence/QueryEvidenceResponse.json new file mode 100644 index 00000000..efcdbdcd --- /dev/null +++ b/source/json_tables/cosmos/evidence/QueryEvidenceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "evidence", + "Type": "types.Any", + "Description": "evidence returns the requested evidence." + } +] diff --git a/source/json_tables/cosmos/genutil/GenesisState.json b/source/json_tables/cosmos/genutil/GenesisState.json new file mode 100644 index 00000000..2466de42 --- /dev/null +++ b/source/json_tables/cosmos/genutil/GenesisState.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "gen_txs", + "Type": "encoding_json.RawMessage array", + "Description": "gen_txs defines the genesis transactions." + } +] diff --git a/source/json_tables/cosmos/gov/v1/Deposit.json b/source/json_tables/cosmos/gov/v1/Deposit.json new file mode 100644 index 00000000..15eb719b --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/Deposit.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal." + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "depositor defines the deposit addresses from the proposals." + }, + { + "Parameter": "amount", + "Type": "types.Coin array", + "Description": "amount to be deposited by depositor." + } +] diff --git a/source/json_tables/cosmos/gov/v1/DepositParams.json b/source/json_tables/cosmos/gov/v1/DepositParams.json new file mode 100644 index 00000000..866e80d4 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/DepositParams.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "min_deposit", + "Type": "types.Coin array", + "Description": "Minimum deposit for a proposal to enter voting period." + }, + { + "Parameter": "max_deposit_period", + "Type": "time.Duration", + "Description": "Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months." + } +] diff --git a/source/json_tables/cosmos/gov/v1/GenesisState.json b/source/json_tables/cosmos/gov/v1/GenesisState.json new file mode 100644 index 00000000..c9c155ab --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/GenesisState.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "starting_proposal_id", + "Type": "uint64", + "Description": "starting_proposal_id is the ID of the starting proposal." + }, + { + "Parameter": "deposits", + "Type": "Deposit array", + "Description": "deposits defines all the deposits present at genesis." + }, + { + "Parameter": "votes", + "Type": "Vote array", + "Description": "votes defines all the votes present at genesis." + }, + { + "Parameter": "proposals", + "Type": "Proposal array", + "Description": "proposals defines all the proposals present at genesis." + }, + { + "Parameter": "deposit_params", + "Type": "DepositParams", + "Description": "Deprecated: Prefer to use `params` instead. deposit_params defines all the paramaters of related to deposit." + }, + { + "Parameter": "voting_params", + "Type": "VotingParams", + "Description": "Deprecated: Prefer to use `params` instead. voting_params defines all the paramaters of related to voting." + }, + { + "Parameter": "tally_params", + "Type": "TallyParams", + "Description": "Deprecated: Prefer to use `params` instead. tally_params defines all the paramaters of related to tally." + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the paramaters of x/gov module. Since: cosmos-sdk 0.47" + }, + { + "Parameter": "constitution", + "Type": "string", + "Description": "The constitution allows builders to lay a foundation and define purpose. This is an immutable string set in genesis. There are no amendments, to go outside of scope, just fork. constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals. Since: cosmos-sdk 0.50" + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgCancelProposal.json b/source/json_tables/cosmos/gov/v1/MsgCancelProposal.json new file mode 100644 index 00000000..71ab7ac4 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgCancelProposal.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "proposer", + "Type": "string", + "Description": "proposer is the account address of the proposer.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgCancelProposalResponse.json b/source/json_tables/cosmos/gov/v1/MsgCancelProposalResponse.json new file mode 100644 index 00000000..c8760a73 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgCancelProposalResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal." + }, + { + "Parameter": "canceled_time", + "Type": "time.Time", + "Description": "canceled_time is the time when proposal is canceled." + }, + { + "Parameter": "canceled_height", + "Type": "uint64", + "Description": "canceled_height defines the block height at which the proposal is canceled." + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgDeposit.json b/source/json_tables/cosmos/gov/v1/MsgDeposit.json new file mode 100644 index 00000000..3d84f54d --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgDeposit.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "depositor defines the deposit addresses from the proposals.", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types1.Coin array", + "Description": "amount to be deposited by depositor.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgExecLegacyContent.json b/source/json_tables/cosmos/gov/v1/MsgExecLegacyContent.json new file mode 100644 index 00000000..4324c54d --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgExecLegacyContent.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "content", + "Type": "types.Any", + "Description": "content is the proposal's content.", + "Required": "No" + }, + { + "Parameter": "authority", + "Type": "string", + "Description": "authority must be the gov module address.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgSubmitProposal.json b/source/json_tables/cosmos/gov/v1/MsgSubmitProposal.json new file mode 100644 index 00000000..0ce6440d --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgSubmitProposal.json @@ -0,0 +1,44 @@ +[ + { + "Parameter": "messages", + "Type": "types.Any array", + "Description": "messages are the arbitrary messages to be executed if proposal passes.", + "Required": "No" + }, + { + "Parameter": "initial_deposit", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "initial_deposit is the deposit value that must be paid at proposal submission.", + "Required": "Yes" + }, + { + "Parameter": "proposer", + "Type": "string", + "Description": "proposer is the account address of the proposer.", + "Required": "Yes" + }, + { + "Parameter": "metadata", + "Type": "string", + "Description": "metadata is any arbitrary metadata attached to the proposal.", + "Required": "Yes" + }, + { + "Parameter": "title", + "Type": "string", + "Description": "title is the title of the proposal. Since: cosmos-sdk 0.47", + "Required": "Yes" + }, + { + "Parameter": "summary", + "Type": "string", + "Description": "summary is the summary of the proposal Since: cosmos-sdk 0.47", + "Required": "Yes" + }, + { + "Parameter": "expedited", + "Type": "bool", + "Description": "expedited defines if the proposal is expedited or not Since: cosmos-sdk 0.50", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgSubmitProposalResponse.json b/source/json_tables/cosmos/gov/v1/MsgSubmitProposalResponse.json new file mode 100644 index 00000000..ac6f0dd6 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgSubmitProposalResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal." + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgUpdateParams.json b/source/json_tables/cosmos/gov/v1/MsgUpdateParams.json new file mode 100644 index 00000000..9002adbc --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the x/gov parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgVote.json b/source/json_tables/cosmos/gov/v1/MsgVote.json new file mode 100644 index 00000000..91c5b1cc --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgVote.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter is the voter address for the proposal.", + "Required": "Yes" + }, + { + "Parameter": "option", + "Type": "VoteOption", + "Description": "option defines the vote option.", + "Required": "Yes" + }, + { + "Parameter": "metadata", + "Type": "string", + "Description": "metadata is any arbitrary metadata attached to the Vote.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/MsgVoteWeighted.json b/source/json_tables/cosmos/gov/v1/MsgVoteWeighted.json new file mode 100644 index 00000000..384665d2 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/MsgVoteWeighted.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter is the voter address for the proposal.", + "Required": "Yes" + }, + { + "Parameter": "options", + "Type": "WeightedVoteOption array", + "Description": "options defines the weighted vote options.", + "Required": "No" + }, + { + "Parameter": "metadata", + "Type": "string", + "Description": "metadata is any arbitrary metadata attached to the VoteWeighted.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/Params.json b/source/json_tables/cosmos/gov/v1/Params.json new file mode 100644 index 00000000..87778333 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/Params.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "min_deposit", + "Type": "types.Coin array", + "Description": "Minimum deposit for a proposal to enter voting period." + }, + { + "Parameter": "max_deposit_period", + "Type": "time.Duration", + "Description": "Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months." + }, + { + "Parameter": "voting_period", + "Type": "time.Duration", + "Description": "Duration of the voting period." + }, + { + "Parameter": "quorum", + "Type": "string", + "Description": "Minimum percentage of total stake needed to vote for a result to be considered valid." + }, + { + "Parameter": "threshold", + "Type": "string", + "Description": "Minimum proportion of Yes votes for proposal to pass. Default value: 0.5." + }, + { + "Parameter": "veto_threshold", + "Type": "string", + "Description": "Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3." + }, + { + "Parameter": "min_initial_deposit_ratio", + "Type": "string", + "Description": "The ratio representing the proportion of the deposit value that must be paid at proposal submission." + }, + { + "Parameter": "proposal_cancel_ratio", + "Type": "string", + "Description": "The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Since: cosmos-sdk 0.50" + }, + { + "Parameter": "proposal_cancel_dest", + "Type": "string", + "Description": "The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Since: cosmos-sdk 0.50" + }, + { + "Parameter": "expedited_voting_period", + "Type": "time.Duration", + "Description": "Duration of the voting period of an expedited proposal. Since: cosmos-sdk 0.50" + }, + { + "Parameter": "expedited_threshold", + "Type": "string", + "Description": "Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Since: cosmos-sdk 0.50" + }, + { + "Parameter": "expedited_min_deposit", + "Type": "types.Coin array", + "Description": "Minimum expedited deposit for a proposal to enter voting period." + }, + { + "Parameter": "burn_vote_quorum", + "Type": "bool", + "Description": "burn deposits if a proposal does not meet quorum" + }, + { + "Parameter": "burn_proposal_deposit_prevote", + "Type": "bool", + "Description": "burn deposits if the proposal does not enter voting period" + }, + { + "Parameter": "burn_vote_veto", + "Type": "bool", + "Description": "burn deposits if quorum with vote type no_veto is met" + }, + { + "Parameter": "min_deposit_ratio", + "Type": "string", + "Description": "The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Since: cosmos-sdk 0.50" + } +] diff --git a/source/json_tables/cosmos/gov/v1/Proposal.json b/source/json_tables/cosmos/gov/v1/Proposal.json new file mode 100644 index 00000000..d4d80457 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/Proposal.json @@ -0,0 +1,77 @@ +[ + { + "Parameter": "id", + "Type": "uint64", + "Description": "id defines the unique id of the proposal." + }, + { + "Parameter": "messages", + "Type": "types1.Any array", + "Description": "messages are the arbitrary messages to be executed if the proposal passes." + }, + { + "Parameter": "status", + "Type": "ProposalStatus", + "Description": "status defines the proposal status." + }, + { + "Parameter": "final_tally_result", + "Type": "TallyResult", + "Description": "final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended." + }, + { + "Parameter": "submit_time", + "Type": "time.Time", + "Description": "submit_time is the time of proposal submission." + }, + { + "Parameter": "deposit_end_time", + "Type": "time.Time", + "Description": "deposit_end_time is the end time for deposition." + }, + { + "Parameter": "total_deposit", + "Type": "types.Coin array", + "Description": "total_deposit is the total deposit on the proposal." + }, + { + "Parameter": "voting_start_time", + "Type": "time.Time", + "Description": "voting_start_time is the starting time to vote on a proposal." + }, + { + "Parameter": "voting_end_time", + "Type": "time.Time", + "Description": "voting_end_time is the end time of voting on a proposal." + }, + { + "Parameter": "metadata", + "Type": "string", + "Description": "metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3" + }, + { + "Parameter": "title", + "Type": "string", + "Description": "title is the title of the proposal Since: cosmos-sdk 0.47" + }, + { + "Parameter": "summary", + "Type": "string", + "Description": "summary is a short summary of the proposal Since: cosmos-sdk 0.47" + }, + { + "Parameter": "proposer", + "Type": "string", + "Description": "proposer is the address of the proposal sumbitter Since: cosmos-sdk 0.47" + }, + { + "Parameter": "expedited", + "Type": "bool", + "Description": "expedited defines if the proposal is expedited Since: cosmos-sdk 0.50" + }, + { + "Parameter": "failed_reason", + "Type": "string", + "Description": "failed_reason defines the reason why the proposal failed Since: cosmos-sdk 0.50" + } +] diff --git a/source/json_tables/cosmos/gov/v1/ProposalStatus.json b/source/json_tables/cosmos/gov/v1/ProposalStatus.json new file mode 100644 index 00000000..59d34581 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/ProposalStatus.json @@ -0,0 +1,26 @@ +[ + { + "Code": "0", + "Name": "PROPOSAL_STATUS_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "PROPOSAL_STATUS_DEPOSIT_PERIOD" + }, + { + "Code": "2", + "Name": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + { + "Code": "3", + "Name": "PROPOSAL_STATUS_PASSED" + }, + { + "Code": "4", + "Name": "PROPOSAL_STATUS_REJECTED" + }, + { + "Code": "5", + "Name": "PROPOSAL_STATUS_FAILED" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryConstitutionResponse.json b/source/json_tables/cosmos/gov/v1/QueryConstitutionResponse.json new file mode 100644 index 00000000..ec13de34 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryConstitutionResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "constitution", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryDepositRequest.json b/source/json_tables/cosmos/gov/v1/QueryDepositRequest.json new file mode 100644 index 00000000..6b064826 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryDepositRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "depositor defines the deposit addresses from the proposals.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryDepositResponse.json b/source/json_tables/cosmos/gov/v1/QueryDepositResponse.json new file mode 100644 index 00000000..fcdda425 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryDepositResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "deposit", + "Type": "Deposit", + "Description": "deposit defines the requested deposit." + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryDepositsRequest.json b/source/json_tables/cosmos/gov/v1/QueryDepositsRequest.json new file mode 100644 index 00000000..bea767fe --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryDepositsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryDepositsResponse.json b/source/json_tables/cosmos/gov/v1/QueryDepositsResponse.json new file mode 100644 index 00000000..f5dc318a --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryDepositsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "deposits", + "Type": "Deposit array", + "Description": "deposits defines the requested deposits." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryParamsRequest.json b/source/json_tables/cosmos/gov/v1/QueryParamsRequest.json new file mode 100644 index 00000000..ced2e6d5 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryParamsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "params_type", + "Type": "string", + "Description": "params_type defines which parameters to query for, can be one of \"voting\", \"tallying\" or \"deposit\".", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryParamsResponse.json b/source/json_tables/cosmos/gov/v1/QueryParamsResponse.json new file mode 100644 index 00000000..5fc835b7 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryParamsResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "voting_params", + "Type": "VotingParams", + "Description": "Deprecated: Prefer to use `params` instead. voting_params defines the parameters related to voting." + }, + { + "Parameter": "deposit_params", + "Type": "DepositParams", + "Description": "Deprecated: Prefer to use `params` instead. deposit_params defines the parameters related to deposit." + }, + { + "Parameter": "tally_params", + "Type": "TallyParams", + "Description": "Deprecated: Prefer to use `params` instead. tally_params defines the parameters related to tally." + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the paramaters of x/gov module. Since: cosmos-sdk 0.47" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryProposalRequest.json b/source/json_tables/cosmos/gov/v1/QueryProposalRequest.json new file mode 100644 index 00000000..a6b32227 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryProposalRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryProposalResponse.json b/source/json_tables/cosmos/gov/v1/QueryProposalResponse.json new file mode 100644 index 00000000..32ee9378 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryProposalResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "proposal", + "Type": "Proposal", + "Description": "proposal is the requested governance proposal." + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryProposalsRequest.json b/source/json_tables/cosmos/gov/v1/QueryProposalsRequest.json new file mode 100644 index 00000000..a9fbd3cf --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryProposalsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "proposal_status", + "Type": "ProposalStatus", + "Description": "proposal_status defines the status of the proposals.", + "Required": "Yes" + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter defines the voter address for the proposals.", + "Required": "Yes" + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "depositor defines the deposit addresses from the proposals.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryProposalsResponse.json b/source/json_tables/cosmos/gov/v1/QueryProposalsResponse.json new file mode 100644 index 00000000..5e8a46ff --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryProposalsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "proposals", + "Type": "Proposal array", + "Description": "proposals defines all the requested governance proposals." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryTallyResultRequest.json b/source/json_tables/cosmos/gov/v1/QueryTallyResultRequest.json new file mode 100644 index 00000000..a6b32227 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryTallyResultRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryTallyResultResponse.json b/source/json_tables/cosmos/gov/v1/QueryTallyResultResponse.json new file mode 100644 index 00000000..fc24e2c8 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryTallyResultResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "tally", + "Type": "TallyResult", + "Description": "tally defines the requested tally." + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryVoteRequest.json b/source/json_tables/cosmos/gov/v1/QueryVoteRequest.json new file mode 100644 index 00000000..e2d9464b --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryVoteRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter defines the voter address for the proposals.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryVoteResponse.json b/source/json_tables/cosmos/gov/v1/QueryVoteResponse.json new file mode 100644 index 00000000..3b1caba5 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryVoteResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "vote", + "Type": "Vote", + "Description": "vote defines the queried vote." + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryVotesRequest.json b/source/json_tables/cosmos/gov/v1/QueryVotesRequest.json new file mode 100644 index 00000000..bea767fe --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryVotesRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/gov/v1/QueryVotesResponse.json b/source/json_tables/cosmos/gov/v1/QueryVotesResponse.json new file mode 100644 index 00000000..958e7556 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/QueryVotesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "votes", + "Type": "Vote array", + "Description": "votes defines the queried votes." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/gov/v1/TallyParams.json b/source/json_tables/cosmos/gov/v1/TallyParams.json new file mode 100644 index 00000000..8c2b8a7e --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/TallyParams.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "quorum", + "Type": "string", + "Description": "Minimum percentage of total stake needed to vote for a result to be considered valid." + }, + { + "Parameter": "threshold", + "Type": "string", + "Description": "Minimum proportion of Yes votes for proposal to pass. Default value: 0.5." + }, + { + "Parameter": "veto_threshold", + "Type": "string", + "Description": "Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3." + } +] diff --git a/source/json_tables/cosmos/gov/v1/TallyResult.json b/source/json_tables/cosmos/gov/v1/TallyResult.json new file mode 100644 index 00000000..23163148 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/TallyResult.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "yes_count", + "Type": "string", + "Description": "yes_count is the number of yes votes on a proposal." + }, + { + "Parameter": "abstain_count", + "Type": "string", + "Description": "abstain_count is the number of abstain votes on a proposal." + }, + { + "Parameter": "no_count", + "Type": "string", + "Description": "no_count is the number of no votes on a proposal." + }, + { + "Parameter": "no_with_veto_count", + "Type": "string", + "Description": "no_with_veto_count is the number of no with veto votes on a proposal." + } +] diff --git a/source/json_tables/cosmos/gov/v1/Vote.json b/source/json_tables/cosmos/gov/v1/Vote.json new file mode 100644 index 00000000..8cf74545 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/Vote.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal." + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter is the voter address of the proposal." + }, + { + "Parameter": "options", + "Type": "WeightedVoteOption array", + "Description": "options is the weighted vote options." + }, + { + "Parameter": "metadata", + "Type": "string", + "Description": "metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5" + } +] diff --git a/source/json_tables/cosmos/gov/v1/VoteOption.json b/source/json_tables/cosmos/gov/v1/VoteOption.json new file mode 100644 index 00000000..49ecfe8d --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/VoteOption.json @@ -0,0 +1,22 @@ +[ + { + "Code": "0", + "Name": "VOTE_OPTION_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "VOTE_OPTION_YES" + }, + { + "Code": "2", + "Name": "VOTE_OPTION_ABSTAIN" + }, + { + "Code": "3", + "Name": "VOTE_OPTION_NO" + }, + { + "Code": "4", + "Name": "VOTE_OPTION_NO_WITH_VETO" + } +] diff --git a/source/json_tables/cosmos/gov/v1/VotingParams.json b/source/json_tables/cosmos/gov/v1/VotingParams.json new file mode 100644 index 00000000..dfc98eb8 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/VotingParams.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "voting_period", + "Type": "time.Duration", + "Description": "Duration of the voting period." + } +] diff --git a/source/json_tables/cosmos/gov/v1/WeightedVoteOption.json b/source/json_tables/cosmos/gov/v1/WeightedVoteOption.json new file mode 100644 index 00000000..c8221fa6 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1/WeightedVoteOption.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "option", + "Type": "VoteOption", + "Description": "option defines the valid vote options, it must not contain duplicate vote options." + }, + { + "Parameter": "weight", + "Type": "string", + "Description": "weight is the vote weight associated with the vote option." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/Deposit.json b/source/json_tables/cosmos/gov/v1beta1/Deposit.json new file mode 100644 index 00000000..de255990 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/Deposit.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal." + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "depositor defines the deposit addresses from the proposals." + }, + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "amount to be deposited by depositor." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/DepositParams.json b/source/json_tables/cosmos/gov/v1beta1/DepositParams.json new file mode 100644 index 00000000..38b8e77d --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/DepositParams.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "min_deposit", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "Minimum deposit for a proposal to enter voting period." + }, + { + "Parameter": "max_deposit_period", + "Type": "time.Duration", + "Description": "Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/GenesisState.json b/source/json_tables/cosmos/gov/v1beta1/GenesisState.json new file mode 100644 index 00000000..d8133993 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/GenesisState.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "starting_proposal_id", + "Type": "uint64", + "Description": "starting_proposal_id is the ID of the starting proposal." + }, + { + "Parameter": "deposits", + "Type": "Deposits", + "Description": "deposits defines all the deposits present at genesis." + }, + { + "Parameter": "votes", + "Type": "Votes", + "Description": "votes defines all the votes present at genesis." + }, + { + "Parameter": "proposals", + "Type": "Proposals", + "Description": "proposals defines all the proposals present at genesis." + }, + { + "Parameter": "deposit_params", + "Type": "DepositParams", + "Description": "deposit_params defines all the parameters related to deposit." + }, + { + "Parameter": "voting_params", + "Type": "VotingParams", + "Description": "voting_params defines all the parameters related to voting." + }, + { + "Parameter": "tally_params", + "Type": "TallyParams", + "Description": "tally_params defines all the parameters related to tally." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/MsgDeposit.json b/source/json_tables/cosmos/gov/v1beta1/MsgDeposit.json new file mode 100644 index 00000000..69f61628 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/MsgDeposit.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "depositor defines the deposit addresses from the proposals.", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "amount to be deposited by depositor.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/MsgSubmitProposal.json b/source/json_tables/cosmos/gov/v1beta1/MsgSubmitProposal.json new file mode 100644 index 00000000..2e35b979 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/MsgSubmitProposal.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "content", + "Type": "types.Any", + "Description": "content is the proposal's content.", + "Required": "No" + }, + { + "Parameter": "initial_deposit", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "initial_deposit is the deposit value that must be paid at proposal submission.", + "Required": "Yes" + }, + { + "Parameter": "proposer", + "Type": "string", + "Description": "proposer is the account address of the proposer.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/MsgSubmitProposalResponse.json b/source/json_tables/cosmos/gov/v1beta1/MsgSubmitProposalResponse.json new file mode 100644 index 00000000..ac6f0dd6 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/MsgSubmitProposalResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/MsgVote.json b/source/json_tables/cosmos/gov/v1beta1/MsgVote.json new file mode 100644 index 00000000..7a346234 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/MsgVote.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter is the voter address for the proposal.", + "Required": "Yes" + }, + { + "Parameter": "option", + "Type": "VoteOption", + "Description": "option defines the vote option.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/MsgVoteWeighted.json b/source/json_tables/cosmos/gov/v1beta1/MsgVoteWeighted.json new file mode 100644 index 00000000..371559c9 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/MsgVoteWeighted.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter is the voter address for the proposal.", + "Required": "Yes" + }, + { + "Parameter": "options", + "Type": "WeightedVoteOption array", + "Description": "options defines the weighted vote options.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/Proposal.json b/source/json_tables/cosmos/gov/v1beta1/Proposal.json new file mode 100644 index 00000000..34637d8a --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/Proposal.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal." + }, + { + "Parameter": "content", + "Type": "types1.Any", + "Description": "content is the proposal's content." + }, + { + "Parameter": "status", + "Type": "ProposalStatus", + "Description": "status defines the proposal status." + }, + { + "Parameter": "final_tally_result", + "Type": "TallyResult", + "Description": "final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended." + }, + { + "Parameter": "submit_time", + "Type": "time.Time", + "Description": "submit_time is the time of proposal submission." + }, + { + "Parameter": "deposit_end_time", + "Type": "time.Time", + "Description": "deposit_end_time is the end time for deposition." + }, + { + "Parameter": "total_deposit", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "total_deposit is the total deposit on the proposal." + }, + { + "Parameter": "voting_start_time", + "Type": "time.Time", + "Description": "voting_start_time is the starting time to vote on a proposal." + }, + { + "Parameter": "voting_end_time", + "Type": "time.Time", + "Description": "voting_end_time is the end time of voting on a proposal." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/ProposalStatus.json b/source/json_tables/cosmos/gov/v1beta1/ProposalStatus.json new file mode 100644 index 00000000..59d34581 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/ProposalStatus.json @@ -0,0 +1,26 @@ +[ + { + "Code": "0", + "Name": "PROPOSAL_STATUS_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "PROPOSAL_STATUS_DEPOSIT_PERIOD" + }, + { + "Code": "2", + "Name": "PROPOSAL_STATUS_VOTING_PERIOD" + }, + { + "Code": "3", + "Name": "PROPOSAL_STATUS_PASSED" + }, + { + "Code": "4", + "Name": "PROPOSAL_STATUS_REJECTED" + }, + { + "Code": "5", + "Name": "PROPOSAL_STATUS_FAILED" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryDepositRequest.json b/source/json_tables/cosmos/gov/v1beta1/QueryDepositRequest.json new file mode 100644 index 00000000..6b064826 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryDepositRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "depositor defines the deposit addresses from the proposals.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryDepositResponse.json b/source/json_tables/cosmos/gov/v1beta1/QueryDepositResponse.json new file mode 100644 index 00000000..fcdda425 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryDepositResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "deposit", + "Type": "Deposit", + "Description": "deposit defines the requested deposit." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryDepositsRequest.json b/source/json_tables/cosmos/gov/v1beta1/QueryDepositsRequest.json new file mode 100644 index 00000000..bea767fe --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryDepositsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryDepositsResponse.json b/source/json_tables/cosmos/gov/v1beta1/QueryDepositsResponse.json new file mode 100644 index 00000000..f5dc318a --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryDepositsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "deposits", + "Type": "Deposit array", + "Description": "deposits defines the requested deposits." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryParamsRequest.json b/source/json_tables/cosmos/gov/v1beta1/QueryParamsRequest.json new file mode 100644 index 00000000..ced2e6d5 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryParamsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "params_type", + "Type": "string", + "Description": "params_type defines which parameters to query for, can be one of \"voting\", \"tallying\" or \"deposit\".", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryParamsResponse.json b/source/json_tables/cosmos/gov/v1beta1/QueryParamsResponse.json new file mode 100644 index 00000000..ccef566b --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryParamsResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "voting_params", + "Type": "VotingParams", + "Description": "voting_params defines the parameters related to voting." + }, + { + "Parameter": "deposit_params", + "Type": "DepositParams", + "Description": "deposit_params defines the parameters related to deposit." + }, + { + "Parameter": "tally_params", + "Type": "TallyParams", + "Description": "tally_params defines the parameters related to tally." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryProposalRequest.json b/source/json_tables/cosmos/gov/v1beta1/QueryProposalRequest.json new file mode 100644 index 00000000..a6b32227 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryProposalRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryProposalResponse.json b/source/json_tables/cosmos/gov/v1beta1/QueryProposalResponse.json new file mode 100644 index 00000000..b3c18bbe --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryProposalResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "proposal", + "Type": "Proposal", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryProposalsRequest.json b/source/json_tables/cosmos/gov/v1beta1/QueryProposalsRequest.json new file mode 100644 index 00000000..a9fbd3cf --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryProposalsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "proposal_status", + "Type": "ProposalStatus", + "Description": "proposal_status defines the status of the proposals.", + "Required": "Yes" + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter defines the voter address for the proposals.", + "Required": "Yes" + }, + { + "Parameter": "depositor", + "Type": "string", + "Description": "depositor defines the deposit addresses from the proposals.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryProposalsResponse.json b/source/json_tables/cosmos/gov/v1beta1/QueryProposalsResponse.json new file mode 100644 index 00000000..5e8a46ff --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryProposalsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "proposals", + "Type": "Proposal array", + "Description": "proposals defines all the requested governance proposals." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryTallyResultRequest.json b/source/json_tables/cosmos/gov/v1beta1/QueryTallyResultRequest.json new file mode 100644 index 00000000..a6b32227 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryTallyResultRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryTallyResultResponse.json b/source/json_tables/cosmos/gov/v1beta1/QueryTallyResultResponse.json new file mode 100644 index 00000000..fc24e2c8 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryTallyResultResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "tally", + "Type": "TallyResult", + "Description": "tally defines the requested tally." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryVoteRequest.json b/source/json_tables/cosmos/gov/v1beta1/QueryVoteRequest.json new file mode 100644 index 00000000..e2d9464b --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryVoteRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter defines the voter address for the proposals.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryVoteResponse.json b/source/json_tables/cosmos/gov/v1beta1/QueryVoteResponse.json new file mode 100644 index 00000000..3b1caba5 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryVoteResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "vote", + "Type": "Vote", + "Description": "vote defines the queried vote." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryVotesRequest.json b/source/json_tables/cosmos/gov/v1beta1/QueryVotesRequest.json new file mode 100644 index 00000000..bea767fe --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryVotesRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/QueryVotesResponse.json b/source/json_tables/cosmos/gov/v1beta1/QueryVotesResponse.json new file mode 100644 index 00000000..958e7556 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/QueryVotesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "votes", + "Type": "Vote array", + "Description": "votes defines the queried votes." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/TallyParams.json b/source/json_tables/cosmos/gov/v1beta1/TallyParams.json new file mode 100644 index 00000000..e740ee3c --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/TallyParams.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "quorum", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "Minimum percentage of total stake needed to vote for a result to be considered valid." + }, + { + "Parameter": "threshold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "Minimum proportion of Yes votes for proposal to pass. Default value: 0.5." + }, + { + "Parameter": "veto_threshold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/TallyResult.json b/source/json_tables/cosmos/gov/v1beta1/TallyResult.json new file mode 100644 index 00000000..b5b00a65 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/TallyResult.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "yes", + "Type": "cosmossdk_io_math.Int", + "Description": "yes is the number of yes votes on a proposal." + }, + { + "Parameter": "abstain", + "Type": "cosmossdk_io_math.Int", + "Description": "abstain is the number of abstain votes on a proposal." + }, + { + "Parameter": "no", + "Type": "cosmossdk_io_math.Int", + "Description": "no is the number of no votes on a proposal." + }, + { + "Parameter": "no_with_veto", + "Type": "cosmossdk_io_math.Int", + "Description": "no_with_veto is the number of no with veto votes on a proposal." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/TextProposal.json b/source/json_tables/cosmos/gov/v1beta1/TextProposal.json new file mode 100644 index 00000000..d44230de --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/TextProposal.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "title of the proposal." + }, + { + "Parameter": "description", + "Type": "string", + "Description": "description associated with the proposal." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/Vote.json b/source/json_tables/cosmos/gov/v1beta1/Vote.json new file mode 100644 index 00000000..5cce72d0 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/Vote.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "proposal_id", + "Type": "uint64", + "Description": "proposal_id defines the unique id of the proposal." + }, + { + "Parameter": "voter", + "Type": "string", + "Description": "voter is the voter address of the proposal." + }, + { + "Parameter": "option", + "Type": "VoteOption", + "Description": "Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED." + }, + { + "Parameter": "options", + "Type": "WeightedVoteOption array", + "Description": "options is the weighted vote options. Since: cosmos-sdk 0.43" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/VoteOption.json b/source/json_tables/cosmos/gov/v1beta1/VoteOption.json new file mode 100644 index 00000000..49ecfe8d --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/VoteOption.json @@ -0,0 +1,22 @@ +[ + { + "Code": "0", + "Name": "VOTE_OPTION_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "VOTE_OPTION_YES" + }, + { + "Code": "2", + "Name": "VOTE_OPTION_ABSTAIN" + }, + { + "Code": "3", + "Name": "VOTE_OPTION_NO" + }, + { + "Code": "4", + "Name": "VOTE_OPTION_NO_WITH_VETO" + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/VotingParams.json b/source/json_tables/cosmos/gov/v1beta1/VotingParams.json new file mode 100644 index 00000000..dfc98eb8 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/VotingParams.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "voting_period", + "Type": "time.Duration", + "Description": "Duration of the voting period." + } +] diff --git a/source/json_tables/cosmos/gov/v1beta1/WeightedVoteOption.json b/source/json_tables/cosmos/gov/v1beta1/WeightedVoteOption.json new file mode 100644 index 00000000..418294b0 --- /dev/null +++ b/source/json_tables/cosmos/gov/v1beta1/WeightedVoteOption.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "option", + "Type": "VoteOption", + "Description": "option defines the valid vote options, it must not contain duplicate vote options." + }, + { + "Parameter": "weight", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "weight is the vote weight associated with the vote option." + } +] diff --git a/source/json_tables/cosmos/group/v1/Exec.json b/source/json_tables/cosmos/group/v1/Exec.json new file mode 100644 index 00000000..578a1545 --- /dev/null +++ b/source/json_tables/cosmos/group/v1/Exec.json @@ -0,0 +1,10 @@ +[ + { + "Code": "0", + "Name": "EXEC_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "EXEC_TRY" + } +] diff --git a/source/json_tables/cosmos/group/v1/ProposalExecutorResult.json b/source/json_tables/cosmos/group/v1/ProposalExecutorResult.json new file mode 100644 index 00000000..567d1ebf --- /dev/null +++ b/source/json_tables/cosmos/group/v1/ProposalExecutorResult.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "PROPOSAL_EXECUTOR_RESULT_NOT_RUN" + }, + { + "Code": "2", + "Name": "PROPOSAL_EXECUTOR_RESULT_SUCCESS" + }, + { + "Code": "3", + "Name": "PROPOSAL_EXECUTOR_RESULT_FAILURE" + } +] diff --git a/source/json_tables/cosmos/group/v1/ProposalStatus.json b/source/json_tables/cosmos/group/v1/ProposalStatus.json new file mode 100644 index 00000000..78d8fdbe --- /dev/null +++ b/source/json_tables/cosmos/group/v1/ProposalStatus.json @@ -0,0 +1,26 @@ +[ + { + "Code": "0", + "Name": "PROPOSAL_STATUS_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "PROPOSAL_STATUS_SUBMITTED" + }, + { + "Code": "2", + "Name": "PROPOSAL_STATUS_ACCEPTED" + }, + { + "Code": "3", + "Name": "PROPOSAL_STATUS_REJECTED" + }, + { + "Code": "4", + "Name": "PROPOSAL_STATUS_ABORTED" + }, + { + "Code": "5", + "Name": "PROPOSAL_STATUS_WITHDRAWN" + } +] diff --git a/source/json_tables/cosmos/group/v1/VoteOption.json b/source/json_tables/cosmos/group/v1/VoteOption.json new file mode 100644 index 00000000..49ecfe8d --- /dev/null +++ b/source/json_tables/cosmos/group/v1/VoteOption.json @@ -0,0 +1,22 @@ +[ + { + "Code": "0", + "Name": "VOTE_OPTION_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "VOTE_OPTION_YES" + }, + { + "Code": "2", + "Name": "VOTE_OPTION_ABSTAIN" + }, + { + "Code": "3", + "Name": "VOTE_OPTION_NO" + }, + { + "Code": "4", + "Name": "VOTE_OPTION_NO_WITH_VETO" + } +] diff --git a/source/json_tables/cosmos/mint/GenesisState.json b/source/json_tables/cosmos/mint/GenesisState.json new file mode 100644 index 00000000..f7f126a5 --- /dev/null +++ b/source/json_tables/cosmos/mint/GenesisState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "minter", + "Type": "Minter", + "Description": "minter is a space for holding current inflation information." + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of the module." + } +] diff --git a/source/json_tables/cosmos/mint/Minter.json b/source/json_tables/cosmos/mint/Minter.json new file mode 100644 index 00000000..5832433a --- /dev/null +++ b/source/json_tables/cosmos/mint/Minter.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "inflation", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "current annual inflation rate" + }, + { + "Parameter": "annual_provisions", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "current annual expected provisions" + } +] diff --git a/source/json_tables/cosmos/mint/MsgUpdateParams.json b/source/json_tables/cosmos/mint/MsgUpdateParams.json new file mode 100644 index 00000000..679f7575 --- /dev/null +++ b/source/json_tables/cosmos/mint/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the x/mint parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/mint/Params.json b/source/json_tables/cosmos/mint/Params.json new file mode 100644 index 00000000..14b481e9 --- /dev/null +++ b/source/json_tables/cosmos/mint/Params.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "mint_denom", + "Type": "string", + "Description": "type of coin to mint" + }, + { + "Parameter": "inflation_rate_change", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maximum annual change in inflation rate" + }, + { + "Parameter": "inflation_max", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maximum inflation rate" + }, + { + "Parameter": "inflation_min", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "minimum inflation rate" + }, + { + "Parameter": "goal_bonded", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "goal of percent bonded atoms" + }, + { + "Parameter": "blocks_per_year", + "Type": "uint64", + "Description": "expected blocks per year" + } +] diff --git a/source/json_tables/cosmos/mint/QueryAnnualProvisionsResponse.json b/source/json_tables/cosmos/mint/QueryAnnualProvisionsResponse.json new file mode 100644 index 00000000..65486b07 --- /dev/null +++ b/source/json_tables/cosmos/mint/QueryAnnualProvisionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "annual_provisions", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "annual_provisions is the current minting annual provisions value." + } +] diff --git a/source/json_tables/cosmos/mint/QueryInflationResponse.json b/source/json_tables/cosmos/mint/QueryInflationResponse.json new file mode 100644 index 00000000..b1098f22 --- /dev/null +++ b/source/json_tables/cosmos/mint/QueryInflationResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "inflation", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "inflation is the current minting inflation value." + } +] diff --git a/source/json_tables/cosmos/mint/QueryParamsResponse.json b/source/json_tables/cosmos/mint/QueryParamsResponse.json new file mode 100644 index 00000000..27703560 --- /dev/null +++ b/source/json_tables/cosmos/mint/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + } +] diff --git a/source/json_tables/cosmos/orm/v1alpha1/StorageType.json b/source/json_tables/cosmos/orm/v1alpha1/StorageType.json new file mode 100644 index 00000000..8464b013 --- /dev/null +++ b/source/json_tables/cosmos/orm/v1alpha1/StorageType.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "STORAGE_TYPE_DEFAULT_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "STORAGE_TYPE_MEMORY" + }, + { + "Code": "2", + "Name": "STORAGE_TYPE_TRANSIENT" + } +] diff --git a/source/json_tables/cosmos/query/PageRequest.json b/source/json_tables/cosmos/query/PageRequest.json new file mode 100644 index 00000000..ee168ff0 --- /dev/null +++ b/source/json_tables/cosmos/query/PageRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "key", + "Type": "byte array", + "Description": "key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.", + "Required": "Yes" + }, + { + "Parameter": "offset", + "Type": "uint64", + "Description": "offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "uint64", + "Description": "limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.", + "Required": "Yes" + }, + { + "Parameter": "count_total", + "Type": "bool", + "Description": "count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.", + "Required": "Yes" + }, + { + "Parameter": "reverse", + "Type": "bool", + "Description": "reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/query/PageResponse.json b/source/json_tables/cosmos/query/PageResponse.json new file mode 100644 index 00000000..d4aec544 --- /dev/null +++ b/source/json_tables/cosmos/query/PageResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "next_key", + "Type": "byte array", + "Description": "next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results." + }, + { + "Parameter": "total", + "Type": "uint64", + "Description": "total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise" + } +] diff --git a/source/json_tables/cosmos/slashing/GenesisState.json b/source/json_tables/cosmos/slashing/GenesisState.json new file mode 100644 index 00000000..e4651164 --- /dev/null +++ b/source/json_tables/cosmos/slashing/GenesisState.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of the module." + }, + { + "Parameter": "signing_infos", + "Type": "SigningInfo array", + "Description": "signing_infos represents a map between validator addresses and their signing infos." + }, + { + "Parameter": "missed_blocks", + "Type": "ValidatorMissedBlocks array", + "Description": "missed_blocks represents a map between validator addresses and their missed blocks." + } +] diff --git a/source/json_tables/cosmos/slashing/MissedBlock.json b/source/json_tables/cosmos/slashing/MissedBlock.json new file mode 100644 index 00000000..13a95850 --- /dev/null +++ b/source/json_tables/cosmos/slashing/MissedBlock.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "index", + "Type": "int64", + "Description": "index is the height at which the block was missed." + }, + { + "Parameter": "missed", + "Type": "bool", + "Description": "missed is the missed status." + } +] diff --git a/source/json_tables/cosmos/slashing/MsgUnjail.json b/source/json_tables/cosmos/slashing/MsgUnjail.json new file mode 100644 index 00000000..fb69b50d --- /dev/null +++ b/source/json_tables/cosmos/slashing/MsgUnjail.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "validator_addr", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/slashing/MsgUpdateParams.json b/source/json_tables/cosmos/slashing/MsgUpdateParams.json new file mode 100644 index 00000000..c4181378 --- /dev/null +++ b/source/json_tables/cosmos/slashing/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the x/slashing parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/slashing/Params.json b/source/json_tables/cosmos/slashing/Params.json new file mode 100644 index 00000000..45b3cddd --- /dev/null +++ b/source/json_tables/cosmos/slashing/Params.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "signed_blocks_window", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "min_signed_per_window", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "downtime_jail_duration", + "Type": "time.Duration", + "Description": "" + }, + { + "Parameter": "slash_fraction_double_sign", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "slash_fraction_downtime", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/slashing/QueryParamsResponse.json b/source/json_tables/cosmos/slashing/QueryParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/cosmos/slashing/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/slashing/QuerySigningInfoRequest.json b/source/json_tables/cosmos/slashing/QuerySigningInfoRequest.json new file mode 100644 index 00000000..04af73a8 --- /dev/null +++ b/source/json_tables/cosmos/slashing/QuerySigningInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "cons_address", + "Type": "string", + "Description": "cons_address is the address to query signing info of", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/slashing/QuerySigningInfoResponse.json b/source/json_tables/cosmos/slashing/QuerySigningInfoResponse.json new file mode 100644 index 00000000..866d50b6 --- /dev/null +++ b/source/json_tables/cosmos/slashing/QuerySigningInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "val_signing_info", + "Type": "ValidatorSigningInfo", + "Description": "val_signing_info is the signing info of requested val cons address" + } +] diff --git a/source/json_tables/cosmos/slashing/QuerySigningInfosRequest.json b/source/json_tables/cosmos/slashing/QuerySigningInfosRequest.json new file mode 100644 index 00000000..5e714e9a --- /dev/null +++ b/source/json_tables/cosmos/slashing/QuerySigningInfosRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/slashing/QuerySigningInfosResponse.json b/source/json_tables/cosmos/slashing/QuerySigningInfosResponse.json new file mode 100644 index 00000000..6ac57e01 --- /dev/null +++ b/source/json_tables/cosmos/slashing/QuerySigningInfosResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "info", + "Type": "ValidatorSigningInfo array", + "Description": "info is the signing info of all validators" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/slashing/SigningInfo.json b/source/json_tables/cosmos/slashing/SigningInfo.json new file mode 100644 index 00000000..60c10752 --- /dev/null +++ b/source/json_tables/cosmos/slashing/SigningInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the validator address." + }, + { + "Parameter": "validator_signing_info", + "Type": "ValidatorSigningInfo", + "Description": "validator_signing_info represents the signing info of this validator." + } +] diff --git a/source/json_tables/cosmos/slashing/ValidatorMissedBlocks.json b/source/json_tables/cosmos/slashing/ValidatorMissedBlocks.json new file mode 100644 index 00000000..82fa2588 --- /dev/null +++ b/source/json_tables/cosmos/slashing/ValidatorMissedBlocks.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the validator address." + }, + { + "Parameter": "missed_blocks", + "Type": "MissedBlock array", + "Description": "missed_blocks is an array of missed blocks by the validator." + } +] diff --git a/source/json_tables/cosmos/slashing/ValidatorSigningInfo.json b/source/json_tables/cosmos/slashing/ValidatorSigningInfo.json new file mode 100644 index 00000000..467cb820 --- /dev/null +++ b/source/json_tables/cosmos/slashing/ValidatorSigningInfo.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "start_height", + "Type": "int64", + "Description": "Height at which validator was first a candidate OR was un-jailed" + }, + { + "Parameter": "index_offset", + "Type": "int64", + "Description": "Index which is incremented every time a validator is bonded in a block and _may_ have signed a pre-commit or not. This in conjunction with the signed_blocks_window param determines the index in the missed block bitmap." + }, + { + "Parameter": "jailed_until", + "Type": "time.Time", + "Description": "Timestamp until which the validator is jailed due to liveness downtime." + }, + { + "Parameter": "tombstoned", + "Type": "bool", + "Description": "Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior." + }, + { + "Parameter": "missed_blocks_counter", + "Type": "int64", + "Description": "A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap." + } +] diff --git a/source/json_tables/cosmos/staking/Commission.json b/source/json_tables/cosmos/staking/Commission.json new file mode 100644 index 00000000..fd13d7c9 --- /dev/null +++ b/source/json_tables/cosmos/staking/Commission.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "commission_rates", + "Type": "CommissionRates", + "Description": "commission_rates defines the initial commission rates to be used for creating a validator." + }, + { + "Parameter": "update_time", + "Type": "time.Time", + "Description": "update_time is the last time the commission rate was changed." + } +] diff --git a/source/json_tables/cosmos/staking/CommissionRates.json b/source/json_tables/cosmos/staking/CommissionRates.json new file mode 100644 index 00000000..8e21dd6e --- /dev/null +++ b/source/json_tables/cosmos/staking/CommissionRates.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "rate is the commission rate charged to delegators, as a fraction." + }, + { + "Parameter": "max_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "max_rate defines the maximum commission rate which validator can ever charge, as a fraction." + }, + { + "Parameter": "max_change_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "max_change_rate defines the maximum daily increase of the validator commission, as a fraction." + } +] diff --git a/source/json_tables/cosmos/staking/DVPair.json b/source/json_tables/cosmos/staking/DVPair.json new file mode 100644 index 00000000..259ba3bc --- /dev/null +++ b/source/json_tables/cosmos/staking/DVPair.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/DVPairs.json b/source/json_tables/cosmos/staking/DVPairs.json new file mode 100644 index 00000000..5d04ca05 --- /dev/null +++ b/source/json_tables/cosmos/staking/DVPairs.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "pairs", + "Type": "DVPair array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/DVVTriplet.json b/source/json_tables/cosmos/staking/DVVTriplet.json new file mode 100644 index 00000000..9dbbc130 --- /dev/null +++ b/source/json_tables/cosmos/staking/DVVTriplet.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "validator_src_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "validator_dst_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/DVVTriplets.json b/source/json_tables/cosmos/staking/DVVTriplets.json new file mode 100644 index 00000000..aa8272ce --- /dev/null +++ b/source/json_tables/cosmos/staking/DVVTriplets.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "triplets", + "Type": "DVVTriplet array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/Delegation.json b/source/json_tables/cosmos/staking/Delegation.json new file mode 100644 index 00000000..349d279b --- /dev/null +++ b/source/json_tables/cosmos/staking/Delegation.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address is the encoded address of the delegator." + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address is the encoded address of the validator." + }, + { + "Parameter": "shares", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "shares define the delegation shares received." + } +] diff --git a/source/json_tables/cosmos/staking/DelegationResponse.json b/source/json_tables/cosmos/staking/DelegationResponse.json new file mode 100644 index 00000000..6c70f468 --- /dev/null +++ b/source/json_tables/cosmos/staking/DelegationResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "delegation", + "Type": "Delegation", + "Description": "" + }, + { + "Parameter": "balance", + "Type": "types1.Coin", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/Description.json b/source/json_tables/cosmos/staking/Description.json new file mode 100644 index 00000000..06d286be --- /dev/null +++ b/source/json_tables/cosmos/staking/Description.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "moniker", + "Type": "string", + "Description": "moniker defines a human-readable name for the validator." + }, + { + "Parameter": "identity", + "Type": "string", + "Description": "identity defines an optional identity signature (ex. UPort or Keybase)." + }, + { + "Parameter": "website", + "Type": "string", + "Description": "website defines an optional website link." + }, + { + "Parameter": "security_contact", + "Type": "string", + "Description": "security_contact defines an optional email for security contact." + }, + { + "Parameter": "details", + "Type": "string", + "Description": "details define other optional details." + } +] diff --git a/source/json_tables/cosmos/staking/GenesisState.json b/source/json_tables/cosmos/staking/GenesisState.json new file mode 100644 index 00000000..337a9220 --- /dev/null +++ b/source/json_tables/cosmos/staking/GenesisState.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of related to deposit." + }, + { + "Parameter": "last_total_power", + "Type": "cosmossdk_io_math.Int", + "Description": "last_total_power tracks the total amounts of bonded tokens recorded during the previous end block." + }, + { + "Parameter": "last_validator_powers", + "Type": "LastValidatorPower array", + "Description": "last_validator_powers is a special index that provides a historical list of the last-block's bonded validators." + }, + { + "Parameter": "validators", + "Type": "Validator array", + "Description": "validators defines the validator set at genesis." + }, + { + "Parameter": "delegations", + "Type": "Delegation array", + "Description": "delegations defines the delegations active at genesis." + }, + { + "Parameter": "unbonding_delegations", + "Type": "UnbondingDelegation array", + "Description": "unbonding_delegations defines the unbonding delegations active at genesis." + }, + { + "Parameter": "redelegations", + "Type": "Redelegation array", + "Description": "redelegations defines the redelegations active at genesis." + }, + { + "Parameter": "exported", + "Type": "bool", + "Description": "exported defines a bool to identify whether the chain dealing with exported or initialized genesis." + }, + { + "Parameter": "allowed_delegation_transfer_receivers", + "Type": "string array", + "Description": "allowed_delegation_transfer_receivers defines the list of addresses that are allowed to receive delegation transfers." + } +] diff --git a/source/json_tables/cosmos/staking/HistoricalInfo.json b/source/json_tables/cosmos/staking/HistoricalInfo.json new file mode 100644 index 00000000..e85bfae8 --- /dev/null +++ b/source/json_tables/cosmos/staking/HistoricalInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "header", + "Type": "v1.Header", + "Description": "" + }, + { + "Parameter": "valset", + "Type": "Validator array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/LastValidatorPower.json b/source/json_tables/cosmos/staking/LastValidatorPower.json new file mode 100644 index 00000000..e516042a --- /dev/null +++ b/source/json_tables/cosmos/staking/LastValidatorPower.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the address of the validator." + }, + { + "Parameter": "power", + "Type": "int64", + "Description": "power defines the power of the validator." + } +] diff --git a/source/json_tables/cosmos/staking/MsgBeginRedelegate.json b/source/json_tables/cosmos/staking/MsgBeginRedelegate.json new file mode 100644 index 00000000..4209e32d --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgBeginRedelegate.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_src_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_dst_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types1.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/MsgBeginRedelegateResponse.json b/source/json_tables/cosmos/staking/MsgBeginRedelegateResponse.json new file mode 100644 index 00000000..a611a62c --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgBeginRedelegateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "completion_time", + "Type": "time.Time", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/MsgCancelUnbondingDelegation.json b/source/json_tables/cosmos/staking/MsgCancelUnbondingDelegation.json new file mode 100644 index 00000000..11cddbdd --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgCancelUnbondingDelegation.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types1.Coin", + "Description": "amount is always less than or equal to unbonding delegation entry balance", + "Required": "Yes" + }, + { + "Parameter": "creation_height", + "Type": "int64", + "Description": "creation_height is the height which the unbonding took place.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/MsgCreateValidator.json b/source/json_tables/cosmos/staking/MsgCreateValidator.json new file mode 100644 index 00000000..74af0c96 --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgCreateValidator.json @@ -0,0 +1,44 @@ +[ + { + "Parameter": "description", + "Type": "Description", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "commission", + "Type": "CommissionRates", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "min_self_delegation", + "Type": "cosmossdk_io_math.Int", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation).", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "pubkey", + "Type": "types.Any", + "Description": "", + "Required": "No" + }, + { + "Parameter": "value", + "Type": "types1.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/MsgDelegate.json b/source/json_tables/cosmos/staking/MsgDelegate.json new file mode 100644 index 00000000..4f9abc7b --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgDelegate.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types1.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/MsgEditValidator.json b/source/json_tables/cosmos/staking/MsgEditValidator.json new file mode 100644 index 00000000..16f7769e --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgEditValidator.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "description", + "Type": "Description", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "commission_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "We pass a reference to the new commission rate and min self delegation as it's not mandatory to update. If not updated, the deserialized rate will be zero with no way to distinguish if an update was intended. REF: #2373", + "Required": "Yes" + }, + { + "Parameter": "min_self_delegation", + "Type": "cosmossdk_io_math.Int", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/staking/MsgTransferDelegation.json b/source/json_tables/cosmos/staking/MsgTransferDelegation.json new file mode 100644 index 00000000..a020c121 --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgTransferDelegation.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "receiver_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types1.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/MsgUndelegate.json b/source/json_tables/cosmos/staking/MsgUndelegate.json new file mode 100644 index 00000000..4f9abc7b --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgUndelegate.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types1.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/MsgUndelegateResponse.json b/source/json_tables/cosmos/staking/MsgUndelegateResponse.json new file mode 100644 index 00000000..d4be619f --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgUndelegateResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "completion_time", + "Type": "time.Time", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "types1.Coin", + "Description": "amount returns the amount of undelegated coins Since: cosmos-sdk 0.50" + } +] diff --git a/source/json_tables/cosmos/staking/MsgUpdateParams.json b/source/json_tables/cosmos/staking/MsgUpdateParams.json new file mode 100644 index 00000000..27db8584 --- /dev/null +++ b/source/json_tables/cosmos/staking/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the x/staking parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/Params.json b/source/json_tables/cosmos/staking/Params.json new file mode 100644 index 00000000..a538183f --- /dev/null +++ b/source/json_tables/cosmos/staking/Params.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "unbonding_time", + "Type": "time.Duration", + "Description": "unbonding_time is the time duration of unbonding." + }, + { + "Parameter": "max_validators", + "Type": "uint32", + "Description": "max_validators is the maximum number of validators." + }, + { + "Parameter": "max_entries", + "Type": "uint32", + "Description": "max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio)." + }, + { + "Parameter": "historical_entries", + "Type": "uint32", + "Description": "historical_entries is the number of historical entries to persist." + }, + { + "Parameter": "bond_denom", + "Type": "string", + "Description": "bond_denom defines the bondable coin denomination." + }, + { + "Parameter": "min_commission_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators" + } +] diff --git a/source/json_tables/cosmos/staking/Pool.json b/source/json_tables/cosmos/staking/Pool.json new file mode 100644 index 00000000..53c31c09 --- /dev/null +++ b/source/json_tables/cosmos/staking/Pool.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "not_bonded_tokens", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "bonded_tokens", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/QueryAllowedDelegationTransferReceiversResponse.json b/source/json_tables/cosmos/staking/QueryAllowedDelegationTransferReceiversResponse.json new file mode 100644 index 00000000..263fb01c --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryAllowedDelegationTransferReceiversResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "addresses", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegationRequest.json b/source/json_tables/cosmos/staking/QueryDelegationRequest.json new file mode 100644 index 00000000..0062aa67 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegationRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_addr", + "Type": "string", + "Description": "delegator_addr defines the delegator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "validator_addr", + "Type": "string", + "Description": "validator_addr defines the validator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegationResponse.json b/source/json_tables/cosmos/staking/QueryDelegationResponse.json new file mode 100644 index 00000000..2c32175e --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegationResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "delegation_response", + "Type": "DelegationResponse", + "Description": "delegation_responses defines the delegation info of a delegation." + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegatorDelegationsRequest.json b/source/json_tables/cosmos/staking/QueryDelegatorDelegationsRequest.json new file mode 100644 index 00000000..ea5f4e96 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegatorDelegationsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_addr", + "Type": "string", + "Description": "delegator_addr defines the delegator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegatorDelegationsResponse.json b/source/json_tables/cosmos/staking/QueryDelegatorDelegationsResponse.json new file mode 100644 index 00000000..17513231 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegatorDelegationsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "delegation_responses", + "Type": "DelegationResponse array", + "Description": "delegation_responses defines all the delegations' info of a delegator." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegatorUnbondingDelegationsRequest.json b/source/json_tables/cosmos/staking/QueryDelegatorUnbondingDelegationsRequest.json new file mode 100644 index 00000000..ea5f4e96 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegatorUnbondingDelegationsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_addr", + "Type": "string", + "Description": "delegator_addr defines the delegator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegatorUnbondingDelegationsResponse.json b/source/json_tables/cosmos/staking/QueryDelegatorUnbondingDelegationsResponse.json new file mode 100644 index 00000000..bc317686 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegatorUnbondingDelegationsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "unbonding_responses", + "Type": "UnbondingDelegation array", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegatorValidatorRequest.json b/source/json_tables/cosmos/staking/QueryDelegatorValidatorRequest.json new file mode 100644 index 00000000..0062aa67 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegatorValidatorRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_addr", + "Type": "string", + "Description": "delegator_addr defines the delegator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "validator_addr", + "Type": "string", + "Description": "validator_addr defines the validator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegatorValidatorResponse.json b/source/json_tables/cosmos/staking/QueryDelegatorValidatorResponse.json new file mode 100644 index 00000000..0543ca9a --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegatorValidatorResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "validator", + "Type": "Validator", + "Description": "validator defines the validator info." + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegatorValidatorsRequest.json b/source/json_tables/cosmos/staking/QueryDelegatorValidatorsRequest.json new file mode 100644 index 00000000..ea5f4e96 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegatorValidatorsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_addr", + "Type": "string", + "Description": "delegator_addr defines the delegator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/staking/QueryDelegatorValidatorsResponse.json b/source/json_tables/cosmos/staking/QueryDelegatorValidatorsResponse.json new file mode 100644 index 00000000..d851ed61 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryDelegatorValidatorsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validators", + "Type": "Validator array", + "Description": "validators defines the validators' info of a delegator." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/staking/QueryHistoricalInfoRequest.json b/source/json_tables/cosmos/staking/QueryHistoricalInfoRequest.json new file mode 100644 index 00000000..93335e21 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryHistoricalInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "height defines at which height to query the historical info.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/QueryHistoricalInfoResponse.json b/source/json_tables/cosmos/staking/QueryHistoricalInfoResponse.json new file mode 100644 index 00000000..756fa807 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryHistoricalInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "hist", + "Type": "HistoricalInfo", + "Description": "hist defines the historical info at the given height." + } +] diff --git a/source/json_tables/cosmos/staking/QueryParamsResponse.json b/source/json_tables/cosmos/staking/QueryParamsResponse.json new file mode 100644 index 00000000..d2bf832c --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params holds all the parameters of this module." + } +] diff --git a/source/json_tables/cosmos/staking/QueryPoolResponse.json b/source/json_tables/cosmos/staking/QueryPoolResponse.json new file mode 100644 index 00000000..bf4e0c70 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryPoolResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "pool", + "Type": "Pool", + "Description": "pool defines the pool info." + } +] diff --git a/source/json_tables/cosmos/staking/QueryRedelegationsRequest.json b/source/json_tables/cosmos/staking/QueryRedelegationsRequest.json new file mode 100644 index 00000000..2650d73a --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryRedelegationsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "delegator_addr", + "Type": "string", + "Description": "delegator_addr defines the delegator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "src_validator_addr", + "Type": "string", + "Description": "src_validator_addr defines the validator address to redelegate from.", + "Required": "Yes" + }, + { + "Parameter": "dst_validator_addr", + "Type": "string", + "Description": "dst_validator_addr defines the validator address to redelegate to.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/staking/QueryRedelegationsResponse.json b/source/json_tables/cosmos/staking/QueryRedelegationsResponse.json new file mode 100644 index 00000000..9f33d223 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryRedelegationsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "redelegation_responses", + "Type": "RedelegationResponse array", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/staking/QueryUnbondingDelegationRequest.json b/source/json_tables/cosmos/staking/QueryUnbondingDelegationRequest.json new file mode 100644 index 00000000..0062aa67 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryUnbondingDelegationRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "delegator_addr", + "Type": "string", + "Description": "delegator_addr defines the delegator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "validator_addr", + "Type": "string", + "Description": "validator_addr defines the validator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/QueryUnbondingDelegationResponse.json b/source/json_tables/cosmos/staking/QueryUnbondingDelegationResponse.json new file mode 100644 index 00000000..27ec4d46 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryUnbondingDelegationResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "unbond", + "Type": "UnbondingDelegation", + "Description": "unbond defines the unbonding information of a delegation." + } +] diff --git a/source/json_tables/cosmos/staking/QueryValidatorDelegationsRequest.json b/source/json_tables/cosmos/staking/QueryValidatorDelegationsRequest.json new file mode 100644 index 00000000..088d5a2a --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryValidatorDelegationsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "validator_addr", + "Type": "string", + "Description": "validator_addr defines the validator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/staking/QueryValidatorDelegationsResponse.json b/source/json_tables/cosmos/staking/QueryValidatorDelegationsResponse.json new file mode 100644 index 00000000..0f04d777 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryValidatorDelegationsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "delegation_responses", + "Type": "DelegationResponses", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/staking/QueryValidatorRequest.json b/source/json_tables/cosmos/staking/QueryValidatorRequest.json new file mode 100644 index 00000000..e8ad12a4 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryValidatorRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "validator_addr", + "Type": "string", + "Description": "validator_addr defines the validator address to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/staking/QueryValidatorResponse.json b/source/json_tables/cosmos/staking/QueryValidatorResponse.json new file mode 100644 index 00000000..0543ca9a --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryValidatorResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "validator", + "Type": "Validator", + "Description": "validator defines the validator info." + } +] diff --git a/source/json_tables/cosmos/staking/QueryValidatorUnbondingDelegationsRequest.json b/source/json_tables/cosmos/staking/QueryValidatorUnbondingDelegationsRequest.json new file mode 100644 index 00000000..088d5a2a --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryValidatorUnbondingDelegationsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "validator_addr", + "Type": "string", + "Description": "validator_addr defines the validator address to query for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/staking/QueryValidatorUnbondingDelegationsResponse.json b/source/json_tables/cosmos/staking/QueryValidatorUnbondingDelegationsResponse.json new file mode 100644 index 00000000..bc317686 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryValidatorUnbondingDelegationsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "unbonding_responses", + "Type": "UnbondingDelegation array", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/staking/QueryValidatorsRequest.json b/source/json_tables/cosmos/staking/QueryValidatorsRequest.json new file mode 100644 index 00000000..1dea2366 --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryValidatorsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "status enables to query for validators matching a given status.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/staking/QueryValidatorsResponse.json b/source/json_tables/cosmos/staking/QueryValidatorsResponse.json new file mode 100644 index 00000000..dc199a7f --- /dev/null +++ b/source/json_tables/cosmos/staking/QueryValidatorsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validators", + "Type": "Validator array", + "Description": "validators contains all the queried validators." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/cosmos/staking/Redelegation.json b/source/json_tables/cosmos/staking/Redelegation.json new file mode 100644 index 00000000..f3d5bd23 --- /dev/null +++ b/source/json_tables/cosmos/staking/Redelegation.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address is the bech32-encoded address of the delegator." + }, + { + "Parameter": "validator_src_address", + "Type": "string", + "Description": "validator_src_address is the validator redelegation source operator address." + }, + { + "Parameter": "validator_dst_address", + "Type": "string", + "Description": "validator_dst_address is the validator redelegation destination operator address." + }, + { + "Parameter": "entries", + "Type": "RedelegationEntry array", + "Description": "entries are the redelegation entries." + } +] diff --git a/source/json_tables/cosmos/staking/RedelegationEntry.json b/source/json_tables/cosmos/staking/RedelegationEntry.json new file mode 100644 index 00000000..4a2b91e6 --- /dev/null +++ b/source/json_tables/cosmos/staking/RedelegationEntry.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "creation_height", + "Type": "int64", + "Description": "creation_height defines the height which the redelegation took place." + }, + { + "Parameter": "completion_time", + "Type": "time.Time", + "Description": "completion_time defines the unix time for redelegation completion." + }, + { + "Parameter": "initial_balance", + "Type": "cosmossdk_io_math.Int", + "Description": "initial_balance defines the initial balance when redelegation started." + }, + { + "Parameter": "shares_dst", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "shares_dst is the amount of destination-validator shares created by redelegation." + }, + { + "Parameter": "unbonding_id", + "Type": "uint64", + "Description": "Incrementing id that uniquely identifies this entry" + }, + { + "Parameter": "unbonding_on_hold_ref_count", + "Type": "int64", + "Description": "Strictly positive if this entry's unbonding has been stopped by external modules" + } +] diff --git a/source/json_tables/cosmos/staking/RedelegationEntryResponse.json b/source/json_tables/cosmos/staking/RedelegationEntryResponse.json new file mode 100644 index 00000000..2fa178fe --- /dev/null +++ b/source/json_tables/cosmos/staking/RedelegationEntryResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "redelegation_entry", + "Type": "RedelegationEntry", + "Description": "" + }, + { + "Parameter": "balance", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/RedelegationResponse.json b/source/json_tables/cosmos/staking/RedelegationResponse.json new file mode 100644 index 00000000..5f96a9be --- /dev/null +++ b/source/json_tables/cosmos/staking/RedelegationResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "redelegation", + "Type": "Redelegation", + "Description": "" + }, + { + "Parameter": "entries", + "Type": "RedelegationEntryResponse array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/StakeAuthorization.json b/source/json_tables/cosmos/staking/StakeAuthorization.json new file mode 100644 index 00000000..3d86bad1 --- /dev/null +++ b/source/json_tables/cosmos/staking/StakeAuthorization.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "max_tokens", + "Type": "types.Coin", + "Description": "max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is empty, there is no spend limit and any amount of coins can be delegated." + }, + { + "Parameter": "authorization_type", + "Type": "AuthorizationType", + "Description": "authorization_type defines one of AuthorizationType." + }, + { + "Parameter": "allow_list", + "Type": "StakeAuthorization_Validators", + "Description": "" + }, + { + "Parameter": "deny_list", + "Type": "StakeAuthorization_Validators", + "Description": "" + }, + { + "Parameter": "address", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/UnbondingDelegation.json b/source/json_tables/cosmos/staking/UnbondingDelegation.json new file mode 100644 index 00000000..a3910354 --- /dev/null +++ b/source/json_tables/cosmos/staking/UnbondingDelegation.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "delegator_address", + "Type": "string", + "Description": "delegator_address is the encoded address of the delegator." + }, + { + "Parameter": "validator_address", + "Type": "string", + "Description": "validator_address is the encoded address of the validator." + }, + { + "Parameter": "entries", + "Type": "UnbondingDelegationEntry array", + "Description": "entries are the unbonding delegation entries." + } +] diff --git a/source/json_tables/cosmos/staking/UnbondingDelegationEntry.json b/source/json_tables/cosmos/staking/UnbondingDelegationEntry.json new file mode 100644 index 00000000..437304a6 --- /dev/null +++ b/source/json_tables/cosmos/staking/UnbondingDelegationEntry.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "creation_height", + "Type": "int64", + "Description": "creation_height is the height which the unbonding took place." + }, + { + "Parameter": "completion_time", + "Type": "time.Time", + "Description": "completion_time is the unix time for unbonding completion." + }, + { + "Parameter": "initial_balance", + "Type": "cosmossdk_io_math.Int", + "Description": "initial_balance defines the tokens initially scheduled to receive at completion." + }, + { + "Parameter": "balance", + "Type": "cosmossdk_io_math.Int", + "Description": "balance defines the tokens to receive at completion." + }, + { + "Parameter": "unbonding_id", + "Type": "uint64", + "Description": "Incrementing id that uniquely identifies this entry" + }, + { + "Parameter": "unbonding_on_hold_ref_count", + "Type": "int64", + "Description": "Strictly positive if this entry's unbonding has been stopped by external modules" + } +] diff --git a/source/json_tables/cosmos/staking/ValAddresses.json b/source/json_tables/cosmos/staking/ValAddresses.json new file mode 100644 index 00000000..263fb01c --- /dev/null +++ b/source/json_tables/cosmos/staking/ValAddresses.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "addresses", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/Validator.json b/source/json_tables/cosmos/staking/Validator.json new file mode 100644 index 00000000..e2f5c413 --- /dev/null +++ b/source/json_tables/cosmos/staking/Validator.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "operator_address", + "Type": "string", + "Description": "operator_address defines the address of the validator's operator; bech encoded in JSON." + }, + { + "Parameter": "consensus_pubkey", + "Type": "types.Any", + "Description": "consensus_pubkey is the consensus public key of the validator, as a Protobuf Any." + }, + { + "Parameter": "jailed", + "Type": "bool", + "Description": "jailed defined whether the validator has been jailed from bonded status or not." + }, + { + "Parameter": "status", + "Type": "BondStatus", + "Description": "status is the validator status (bonded/unbonding/unbonded)." + }, + { + "Parameter": "tokens", + "Type": "cosmossdk_io_math.Int", + "Description": "tokens define the delegated tokens (incl. self-delegation)." + }, + { + "Parameter": "delegator_shares", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "delegator_shares defines total shares issued to a validator's delegators." + }, + { + "Parameter": "description", + "Type": "Description", + "Description": "description defines the description terms for the validator." + }, + { + "Parameter": "unbonding_height", + "Type": "int64", + "Description": "unbonding_height defines, if unbonding, the height at which this validator has begun unbonding." + }, + { + "Parameter": "unbonding_time", + "Type": "time.Time", + "Description": "unbonding_time defines, if unbonding, the min time for the validator to complete unbonding." + }, + { + "Parameter": "commission", + "Type": "Commission", + "Description": "commission defines the commission parameters." + }, + { + "Parameter": "min_self_delegation", + "Type": "cosmossdk_io_math.Int", + "Description": "min_self_delegation is the validator's self declared minimum self delegation. Since: cosmos-sdk 0.46" + }, + { + "Parameter": "unbonding_on_hold_ref_count", + "Type": "int64", + "Description": "strictly positive if this validator's unbonding has been stopped by external modules" + }, + { + "Parameter": "unbonding_ids", + "Type": "uint64 array", + "Description": "list of unbonding ids, each uniquely identifing an unbonding of this validator" + } +] diff --git a/source/json_tables/cosmos/staking/ValidatorUpdates.json b/source/json_tables/cosmos/staking/ValidatorUpdates.json new file mode 100644 index 00000000..af98cde9 --- /dev/null +++ b/source/json_tables/cosmos/staking/ValidatorUpdates.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "updates", + "Type": "v11.ValidatorUpdate array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/staking/v1beta1/AuthorizationType.json b/source/json_tables/cosmos/staking/v1beta1/AuthorizationType.json new file mode 100644 index 00000000..e7cfd972 --- /dev/null +++ b/source/json_tables/cosmos/staking/v1beta1/AuthorizationType.json @@ -0,0 +1,22 @@ +[ + { + "Code": "0", + "Name": "AUTHORIZATION_TYPE_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "AUTHORIZATION_TYPE_DELEGATE" + }, + { + "Code": "2", + "Name": "AUTHORIZATION_TYPE_UNDELEGATE" + }, + { + "Code": "3", + "Name": "AUTHORIZATION_TYPE_REDELEGATE" + }, + { + "Code": "4", + "Name": "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" + } +] diff --git a/source/json_tables/cosmos/staking/v1beta1/BondStatus.json b/source/json_tables/cosmos/staking/v1beta1/BondStatus.json new file mode 100644 index 00000000..0422148b --- /dev/null +++ b/source/json_tables/cosmos/staking/v1beta1/BondStatus.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "BOND_STATUS_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "BOND_STATUS_UNBONDED" + }, + { + "Code": "2", + "Name": "BOND_STATUS_UNBONDING" + }, + { + "Code": "3", + "Name": "BOND_STATUS_BONDED" + } +] diff --git a/source/json_tables/cosmos/staking/v1beta1/Infraction.json b/source/json_tables/cosmos/staking/v1beta1/Infraction.json new file mode 100644 index 00000000..6ef35209 --- /dev/null +++ b/source/json_tables/cosmos/staking/v1beta1/Infraction.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "INFRACTION_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "INFRACTION_DOUBLE_SIGN" + }, + { + "Code": "2", + "Name": "INFRACTION_DOWNTIME" + } +] diff --git a/source/json_tables/cosmos/tx/AuthInfo.json b/source/json_tables/cosmos/tx/AuthInfo.json new file mode 100644 index 00000000..e0416b87 --- /dev/null +++ b/source/json_tables/cosmos/tx/AuthInfo.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "signer_infos", + "Type": "SignerInfo array", + "Description": "signer_infos defines the signing modes for the required signers. The number and order of elements must match the required signers from TxBody's messages. The first element is the primary signer and the one which pays the fee." + }, + { + "Parameter": "fee", + "Type": "Fee", + "Description": "Fee is the fee and gas limit for the transaction. The first signer is the primary signer and the one which pays the fee. The fee can be calculated based on the cost of evaluating the body and doing signature verification of the signers. This can be estimated via simulation." + }, + { + "Parameter": "tip", + "Type": "Tip", + "Description": "Tip is the optional tip used for transactions fees paid in another denom. This field is ignored if the chain didn't enable tips, i.e. didn't add the `TipDecorator` in its posthandler. Since: cosmos-sdk 0.46" + } +] diff --git a/source/json_tables/cosmos/tx/AuxSignerData.json b/source/json_tables/cosmos/tx/AuxSignerData.json new file mode 100644 index 00000000..1d94393f --- /dev/null +++ b/source/json_tables/cosmos/tx/AuxSignerData.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the bech32-encoded address of the auxiliary signer. If using AuxSignerData across different chains, the bech32 prefix of the target chain (where the final transaction is broadcasted) should be used." + }, + { + "Parameter": "sign_doc", + "Type": "SignDocDirectAux", + "Description": "sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer signs. Note: we use the same sign doc even if we're signing with LEGACY_AMINO_JSON." + }, + { + "Parameter": "mode", + "Type": "signing.SignMode", + "Description": "mode is the signing mode of the single signer." + }, + { + "Parameter": "sig", + "Type": "byte array", + "Description": "sig is the signature of the sign doc." + } +] diff --git a/source/json_tables/cosmos/tx/BroadcastTxRequest.json b/source/json_tables/cosmos/tx/BroadcastTxRequest.json new file mode 100644 index 00000000..93efd37b --- /dev/null +++ b/source/json_tables/cosmos/tx/BroadcastTxRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "tx_bytes", + "Type": "byte array", + "Description": "tx_bytes is the raw transaction.", + "Required": "Yes" + }, + { + "Parameter": "mode", + "Type": "BroadcastMode", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/tx/BroadcastTxResponse.json b/source/json_tables/cosmos/tx/BroadcastTxResponse.json new file mode 100644 index 00000000..b5d26817 --- /dev/null +++ b/source/json_tables/cosmos/tx/BroadcastTxResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "tx_response", + "Type": "types.TxResponse", + "Description": "tx_response is the queried TxResponses." + } +] diff --git a/source/json_tables/cosmos/tx/Fee.json b/source/json_tables/cosmos/tx/Fee.json new file mode 100644 index 00000000..5f9ca07c --- /dev/null +++ b/source/json_tables/cosmos/tx/Fee.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "amount is the amount of coins to be paid as a fee" + }, + { + "Parameter": "gas_limit", + "Type": "uint64", + "Description": "gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs" + }, + { + "Parameter": "payer", + "Type": "string", + "Description": "if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. the payer must be a tx signer (and thus have signed this field in AuthInfo). setting this field does *not* change the ordering of required signers for the transaction." + }, + { + "Parameter": "granter", + "Type": "string", + "Description": "if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does not support fee grants, this will fail" + } +] diff --git a/source/json_tables/cosmos/tx/GetBlockWithTxsRequest.json b/source/json_tables/cosmos/tx/GetBlockWithTxsRequest.json new file mode 100644 index 00000000..95bb9a09 --- /dev/null +++ b/source/json_tables/cosmos/tx/GetBlockWithTxsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "height is the height of the block to query.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines a pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/tx/GetBlockWithTxsResponse.json b/source/json_tables/cosmos/tx/GetBlockWithTxsResponse.json new file mode 100644 index 00000000..6cde3873 --- /dev/null +++ b/source/json_tables/cosmos/tx/GetBlockWithTxsResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "txs", + "Type": "Tx array", + "Description": "txs are the transactions in the block." + }, + { + "Parameter": "block_id", + "Type": "v1.BlockID", + "Description": "" + }, + { + "Parameter": "block", + "Type": "v1.Block", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines a pagination for the response." + } +] diff --git a/source/json_tables/cosmos/tx/GetTxRequest.json b/source/json_tables/cosmos/tx/GetTxRequest.json new file mode 100644 index 00000000..f09d6a63 --- /dev/null +++ b/source/json_tables/cosmos/tx/GetTxRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "hash", + "Type": "string", + "Description": "hash is the tx hash to query, encoded as a hex string.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/tx/GetTxResponse.json b/source/json_tables/cosmos/tx/GetTxResponse.json new file mode 100644 index 00000000..44d87462 --- /dev/null +++ b/source/json_tables/cosmos/tx/GetTxResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "tx", + "Type": "Tx", + "Description": "tx is the queried transaction." + }, + { + "Parameter": "tx_response", + "Type": "types.TxResponse", + "Description": "tx_response is the queried TxResponses." + } +] diff --git a/source/json_tables/cosmos/tx/GetTxsEventRequest.json b/source/json_tables/cosmos/tx/GetTxsEventRequest.json new file mode 100644 index 00000000..2e0e494f --- /dev/null +++ b/source/json_tables/cosmos/tx/GetTxsEventRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "events", + "Type": "string array", + "Description": "events is the list of transaction event type. Deprecated post v0.47.x: use query instead, which should contain a valid events query.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines a pagination for the request. Deprecated post v0.46.x: use page and limit instead.", + "Required": "No" + }, + { + "Parameter": "order_by", + "Type": "OrderBy", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "page", + "Type": "uint64", + "Description": "page is the page number to query, starts at 1. If not provided, will default to first page.", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "uint64", + "Description": "limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.", + "Required": "Yes" + }, + { + "Parameter": "query", + "Type": "string", + "Description": "query defines the transaction event query that is proxied to Tendermint's TxSearch RPC method. The query must be valid. Since cosmos-sdk 0.50", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/tx/GetTxsEventResponse.json b/source/json_tables/cosmos/tx/GetTxsEventResponse.json new file mode 100644 index 00000000..572d02e0 --- /dev/null +++ b/source/json_tables/cosmos/tx/GetTxsEventResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "txs", + "Type": "Tx array", + "Description": "txs is the list of queried transactions." + }, + { + "Parameter": "tx_responses", + "Type": "types.TxResponse array", + "Description": "tx_responses is the list of queried TxResponses." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines a pagination for the response. Deprecated post v0.46.x: use total instead." + }, + { + "Parameter": "total", + "Type": "uint64", + "Description": "total is total number of results available" + } +] diff --git a/source/json_tables/cosmos/tx/ModeInfo.json b/source/json_tables/cosmos/tx/ModeInfo.json new file mode 100644 index 00000000..f68d6ab4 --- /dev/null +++ b/source/json_tables/cosmos/tx/ModeInfo.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "single", + "Type": "ModeInfo_Single", + "Description": "" + }, + { + "Parameter": "multi", + "Type": "ModeInfo_Multi", + "Description": "" + }, + { + "Parameter": "mode", + "Type": "signing.SignMode", + "Description": "mode is the signing mode of the single signer" + }, + { + "Parameter": "bitarray", + "Type": "types1.CompactBitArray", + "Description": "bitarray specifies which keys within the multisig are signing" + }, + { + "Parameter": "mode_infos", + "Type": "ModeInfo array", + "Description": "mode_infos is the corresponding modes of the signers of the multisig which could include nested multisig public keys" + } +] diff --git a/source/json_tables/cosmos/tx/SignDoc.json b/source/json_tables/cosmos/tx/SignDoc.json new file mode 100644 index 00000000..b6ae10b6 --- /dev/null +++ b/source/json_tables/cosmos/tx/SignDoc.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "body_bytes", + "Type": "byte array", + "Description": "body_bytes is protobuf serialization of a TxBody that matches the representation in TxRaw." + }, + { + "Parameter": "auth_info_bytes", + "Type": "byte array", + "Description": "auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in TxRaw." + }, + { + "Parameter": "chain_id", + "Type": "string", + "Description": "chain_id is the unique identifier of the chain this transaction targets. It prevents signed transactions from being used on another chain by an attacker" + }, + { + "Parameter": "account_number", + "Type": "uint64", + "Description": "account_number is the account number of the account in state" + } +] diff --git a/source/json_tables/cosmos/tx/SignDocDirectAux.json b/source/json_tables/cosmos/tx/SignDocDirectAux.json new file mode 100644 index 00000000..03ef5aa0 --- /dev/null +++ b/source/json_tables/cosmos/tx/SignDocDirectAux.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "body_bytes", + "Type": "byte array", + "Description": "body_bytes is protobuf serialization of a TxBody that matches the representation in TxRaw." + }, + { + "Parameter": "public_key", + "Type": "types.Any", + "Description": "public_key is the public key of the signing account." + }, + { + "Parameter": "chain_id", + "Type": "string", + "Description": "chain_id is the identifier of the chain this transaction targets. It prevents signed transactions from being used on another chain by an attacker." + }, + { + "Parameter": "account_number", + "Type": "uint64", + "Description": "account_number is the account number of the account in state." + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "sequence is the sequence number of the signing account." + }, + { + "Parameter": "tip", + "Type": "Tip", + "Description": "tips have been depreacted and should not be used" + } +] diff --git a/source/json_tables/cosmos/tx/SignerInfo.json b/source/json_tables/cosmos/tx/SignerInfo.json new file mode 100644 index 00000000..240cac1b --- /dev/null +++ b/source/json_tables/cosmos/tx/SignerInfo.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "public_key", + "Type": "types.Any", + "Description": "public_key is the public key of the signer. It is optional for accounts that already exist in state. If unset, the verifier can use the required \\ signer address for this position and lookup the public key." + }, + { + "Parameter": "mode_info", + "Type": "ModeInfo", + "Description": "mode_info describes the signing mode of the signer and is a nested structure to support nested multisig pubkey's" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "sequence is the sequence of the account, which describes the number of committed transactions signed by a given address. It is used to prevent replay attacks." + } +] diff --git a/source/json_tables/cosmos/tx/SimulateRequest.json b/source/json_tables/cosmos/tx/SimulateRequest.json new file mode 100644 index 00000000..ed1a5d88 --- /dev/null +++ b/source/json_tables/cosmos/tx/SimulateRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "tx", + "Type": "Tx", + "Description": "tx is the transaction to simulate. Deprecated. Send raw tx bytes instead.", + "Required": "No" + }, + { + "Parameter": "tx_bytes", + "Type": "byte array", + "Description": "tx_bytes is the raw transaction. Since: cosmos-sdk 0.43", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/tx/SimulateResponse.json b/source/json_tables/cosmos/tx/SimulateResponse.json new file mode 100644 index 00000000..2a06651b --- /dev/null +++ b/source/json_tables/cosmos/tx/SimulateResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "gas_info", + "Type": "types.GasInfo", + "Description": "gas_info is the information about gas used in the simulation." + }, + { + "Parameter": "result", + "Type": "types.Result", + "Description": "result is the result of the simulation." + } +] diff --git a/source/json_tables/cosmos/tx/Tip.json b/source/json_tables/cosmos/tx/Tip.json new file mode 100644 index 00000000..133b11e2 --- /dev/null +++ b/source/json_tables/cosmos/tx/Tip.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "amount is the amount of the tip" + }, + { + "Parameter": "tipper", + "Type": "string", + "Description": "tipper is the address of the account paying for the tip" + } +] diff --git a/source/json_tables/cosmos/tx/Tx.json b/source/json_tables/cosmos/tx/Tx.json new file mode 100644 index 00000000..4639cd7a --- /dev/null +++ b/source/json_tables/cosmos/tx/Tx.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "body", + "Type": "TxBody", + "Description": "body is the processable content of the transaction" + }, + { + "Parameter": "auth_info", + "Type": "AuthInfo", + "Description": "auth_info is the authorization related content of the transaction, specifically signers, signer modes and fee" + }, + { + "Parameter": "signatures", + "Type": "][byte array", + "Description": "signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to allow connecting signature meta information like public key and signing mode by position." + } +] diff --git a/source/json_tables/cosmos/tx/TxBody.json b/source/json_tables/cosmos/tx/TxBody.json new file mode 100644 index 00000000..aeb36615 --- /dev/null +++ b/source/json_tables/cosmos/tx/TxBody.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "messages", + "Type": "types.Any array", + "Description": "messages is a list of messages to be executed. The required signers of those messages define the number and order of elements in AuthInfo's signer_infos and Tx's signatures. Each required signer address is added to the list only the first time it occurs. By convention, the first required signer (usually from the first message) is referred to as the primary signer and pays the fee for the whole transaction." + }, + { + "Parameter": "memo", + "Type": "string", + "Description": "memo is any arbitrary note/comment to be added to the transaction. WARNING: in clients, any publicly exposed text should not be called memo, but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122)." + }, + { + "Parameter": "timeout_height", + "Type": "uint64", + "Description": "timeout is the block height after which this transaction will not be processed by the chain" + }, + { + "Parameter": "extension_options", + "Type": "types.Any array", + "Description": "extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, the transaction will be rejected" + }, + { + "Parameter": "non_critical_extension_options", + "Type": "types.Any array", + "Description": "extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, they will be ignored" + } +] diff --git a/source/json_tables/cosmos/tx/TxDecodeAminoRequest.json b/source/json_tables/cosmos/tx/TxDecodeAminoRequest.json new file mode 100644 index 00000000..812c3ebf --- /dev/null +++ b/source/json_tables/cosmos/tx/TxDecodeAminoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "amino_binary", + "Type": "byte array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/tx/TxDecodeAminoResponse.json b/source/json_tables/cosmos/tx/TxDecodeAminoResponse.json new file mode 100644 index 00000000..6a53ae49 --- /dev/null +++ b/source/json_tables/cosmos/tx/TxDecodeAminoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amino_json", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/tx/TxDecodeRequest.json b/source/json_tables/cosmos/tx/TxDecodeRequest.json new file mode 100644 index 00000000..fced3a43 --- /dev/null +++ b/source/json_tables/cosmos/tx/TxDecodeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "tx_bytes", + "Type": "byte array", + "Description": "tx_bytes is the raw transaction.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/tx/TxDecodeResponse.json b/source/json_tables/cosmos/tx/TxDecodeResponse.json new file mode 100644 index 00000000..51260b8f --- /dev/null +++ b/source/json_tables/cosmos/tx/TxDecodeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "tx", + "Type": "Tx", + "Description": "tx is the decoded transaction." + } +] diff --git a/source/json_tables/cosmos/tx/TxEncodeAminoRequest.json b/source/json_tables/cosmos/tx/TxEncodeAminoRequest.json new file mode 100644 index 00000000..4bfad7cb --- /dev/null +++ b/source/json_tables/cosmos/tx/TxEncodeAminoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "amino_json", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/tx/TxEncodeAminoResponse.json b/source/json_tables/cosmos/tx/TxEncodeAminoResponse.json new file mode 100644 index 00000000..4d52a6ab --- /dev/null +++ b/source/json_tables/cosmos/tx/TxEncodeAminoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amino_binary", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/tx/TxEncodeRequest.json b/source/json_tables/cosmos/tx/TxEncodeRequest.json new file mode 100644 index 00000000..73e9e5e7 --- /dev/null +++ b/source/json_tables/cosmos/tx/TxEncodeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "tx", + "Type": "Tx", + "Description": "tx is the transaction to encode.", + "Required": "No" + } +] diff --git a/source/json_tables/cosmos/tx/TxEncodeResponse.json b/source/json_tables/cosmos/tx/TxEncodeResponse.json new file mode 100644 index 00000000..ff95f972 --- /dev/null +++ b/source/json_tables/cosmos/tx/TxEncodeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "tx_bytes", + "Type": "byte array", + "Description": "tx_bytes is the encoded transaction bytes." + } +] diff --git a/source/json_tables/cosmos/tx/TxRaw.json b/source/json_tables/cosmos/tx/TxRaw.json new file mode 100644 index 00000000..8b34b752 --- /dev/null +++ b/source/json_tables/cosmos/tx/TxRaw.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "body_bytes", + "Type": "byte array", + "Description": "body_bytes is a protobuf serialization of a TxBody that matches the representation in SignDoc." + }, + { + "Parameter": "auth_info_bytes", + "Type": "byte array", + "Description": "auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in SignDoc." + }, + { + "Parameter": "signatures", + "Type": "][byte array", + "Description": "signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to allow connecting signature meta information like public key and signing mode by position." + } +] diff --git a/source/json_tables/cosmos/tx/signing/SignatureDescriptor.json b/source/json_tables/cosmos/tx/signing/SignatureDescriptor.json new file mode 100644 index 00000000..453d1273 --- /dev/null +++ b/source/json_tables/cosmos/tx/signing/SignatureDescriptor.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "public_key", + "Type": "types.Any", + "Description": "public_key is the public key of the signer" + }, + { + "Parameter": "data", + "Type": "SignatureDescriptor_Data", + "Description": "" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "sequence is the sequence of the account, which describes the number of committed transactions signed by a given address. It is used to prevent replay attacks." + }, + { + "Parameter": "single", + "Type": "SignatureDescriptor_Data_Single", + "Description": "" + }, + { + "Parameter": "multi", + "Type": "SignatureDescriptor_Data_Multi", + "Description": "" + }, + { + "Parameter": "mode", + "Type": "SignMode", + "Description": "mode is the signing mode of the single signer" + }, + { + "Parameter": "signature", + "Type": "byte array", + "Description": "signature is the raw signature bytes" + }, + { + "Parameter": "bitarray", + "Type": "types1.CompactBitArray", + "Description": "bitarray specifies which keys within the multisig are signing" + }, + { + "Parameter": "signatures", + "Type": "SignatureDescriptor_Data array", + "Description": "signatures is the signatures of the multi-signature" + } +] diff --git a/source/json_tables/cosmos/tx/signing/SignatureDescriptors.json b/source/json_tables/cosmos/tx/signing/SignatureDescriptors.json new file mode 100644 index 00000000..06a63f0e --- /dev/null +++ b/source/json_tables/cosmos/tx/signing/SignatureDescriptors.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "signatures", + "Type": "SignatureDescriptor array", + "Description": "signatures are the signature descriptors" + } +] diff --git a/source/json_tables/cosmos/tx/signing/v1beta1/SignMode.json b/source/json_tables/cosmos/tx/signing/v1beta1/SignMode.json new file mode 100644 index 00000000..ce3c839a --- /dev/null +++ b/source/json_tables/cosmos/tx/signing/v1beta1/SignMode.json @@ -0,0 +1,30 @@ +[ + { + "Code": "0", + "Name": "SIGN_MODE_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "SIGN_MODE_DIRECT" + }, + { + "Code": "2", + "Name": "SIGN_MODE_TEXTUAL" + }, + { + "Code": "3", + "Name": "SIGN_MODE_DIRECT_AUX" + }, + { + "Code": "127", + "Name": "SIGN_MODE_LEGACY_AMINO_JSON" + }, + { + "Code": "128", + "Name": "SIGN_MODE_EIP712_V2" + }, + { + "Code": "191", + "Name": "SIGN_MODE_EIP_191" + } +] diff --git a/source/json_tables/cosmos/tx/v1beta1/BroadcastMode.json b/source/json_tables/cosmos/tx/v1beta1/BroadcastMode.json new file mode 100644 index 00000000..ac7f36ec --- /dev/null +++ b/source/json_tables/cosmos/tx/v1beta1/BroadcastMode.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "BROADCAST_MODE_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "BROADCAST_MODE_BLOCK" + }, + { + "Code": "2", + "Name": "BROADCAST_MODE_SYNC" + }, + { + "Code": "3", + "Name": "BROADCAST_MODE_ASYNC" + } +] diff --git a/source/json_tables/cosmos/tx/v1beta1/OrderBy.json b/source/json_tables/cosmos/tx/v1beta1/OrderBy.json new file mode 100644 index 00000000..05bc3d11 --- /dev/null +++ b/source/json_tables/cosmos/tx/v1beta1/OrderBy.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "ORDER_BY_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "ORDER_BY_ASC" + }, + { + "Code": "2", + "Name": "ORDER_BY_DESC" + } +] diff --git a/source/json_tables/cosmos/upgrade/CancelSoftwareUpgradeProposal.json b/source/json_tables/cosmos/upgrade/CancelSoftwareUpgradeProposal.json new file mode 100644 index 00000000..3adb2a0b --- /dev/null +++ b/source/json_tables/cosmos/upgrade/CancelSoftwareUpgradeProposal.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "title of the proposal" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "description of the proposal" + } +] diff --git a/source/json_tables/cosmos/upgrade/ModuleVersion.json b/source/json_tables/cosmos/upgrade/ModuleVersion.json new file mode 100644 index 00000000..a60863fc --- /dev/null +++ b/source/json_tables/cosmos/upgrade/ModuleVersion.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "name of the app module" + }, + { + "Parameter": "version", + "Type": "uint64", + "Description": "consensus version of the app module" + } +] diff --git a/source/json_tables/cosmos/upgrade/MsgCancelUpgrade.json b/source/json_tables/cosmos/upgrade/MsgCancelUpgrade.json new file mode 100644 index 00000000..7ea39304 --- /dev/null +++ b/source/json_tables/cosmos/upgrade/MsgCancelUpgrade.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/upgrade/MsgSoftwareUpgrade.json b/source/json_tables/cosmos/upgrade/MsgSoftwareUpgrade.json new file mode 100644 index 00000000..fb8f3353 --- /dev/null +++ b/source/json_tables/cosmos/upgrade/MsgSoftwareUpgrade.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address that controls the module (defaults to x/gov unless overwritten).", + "Required": "Yes" + }, + { + "Parameter": "plan", + "Type": "Plan", + "Description": "plan is the upgrade plan.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/upgrade/Plan.json b/source/json_tables/cosmos/upgrade/Plan.json new file mode 100644 index 00000000..211204d3 --- /dev/null +++ b/source/json_tables/cosmos/upgrade/Plan.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special \"on-upgrade\" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit." + }, + { + "Parameter": "time", + "Type": "time.Time", + "Description": "Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown." + }, + { + "Parameter": "height", + "Type": "int64", + "Description": "The height at which the upgrade must be performed." + }, + { + "Parameter": "info", + "Type": "string", + "Description": "Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to" + }, + { + "Parameter": "upgraded_client_state", + "Type": "types.Any", + "Description": "Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown." + } +] diff --git a/source/json_tables/cosmos/upgrade/QueryAppliedPlanRequest.json b/source/json_tables/cosmos/upgrade/QueryAppliedPlanRequest.json new file mode 100644 index 00000000..8ea6ce0b --- /dev/null +++ b/source/json_tables/cosmos/upgrade/QueryAppliedPlanRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "name is the name of the applied plan to query for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/upgrade/QueryAppliedPlanResponse.json b/source/json_tables/cosmos/upgrade/QueryAppliedPlanResponse.json new file mode 100644 index 00000000..1acd1248 --- /dev/null +++ b/source/json_tables/cosmos/upgrade/QueryAppliedPlanResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "height is the block height at which the plan was applied." + } +] diff --git a/source/json_tables/cosmos/upgrade/QueryAuthorityResponse.json b/source/json_tables/cosmos/upgrade/QueryAuthorityResponse.json new file mode 100644 index 00000000..dc5c548e --- /dev/null +++ b/source/json_tables/cosmos/upgrade/QueryAuthorityResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/cosmos/upgrade/QueryCurrentPlanResponse.json b/source/json_tables/cosmos/upgrade/QueryCurrentPlanResponse.json new file mode 100644 index 00000000..ad5b81ca --- /dev/null +++ b/source/json_tables/cosmos/upgrade/QueryCurrentPlanResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "plan", + "Type": "Plan", + "Description": "plan is the current upgrade plan." + } +] diff --git a/source/json_tables/cosmos/upgrade/QueryModuleVersionsRequest.json b/source/json_tables/cosmos/upgrade/QueryModuleVersionsRequest.json new file mode 100644 index 00000000..a37d4dba --- /dev/null +++ b/source/json_tables/cosmos/upgrade/QueryModuleVersionsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "module_name", + "Type": "string", + "Description": "module_name is a field to query a specific module consensus version from state. Leaving this empty will fetch the full list of module versions from state", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/upgrade/QueryModuleVersionsResponse.json b/source/json_tables/cosmos/upgrade/QueryModuleVersionsResponse.json new file mode 100644 index 00000000..70b3fafd --- /dev/null +++ b/source/json_tables/cosmos/upgrade/QueryModuleVersionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "module_versions", + "Type": "ModuleVersion array", + "Description": "module_versions is a list of module names with their consensus versions." + } +] diff --git a/source/json_tables/cosmos/upgrade/QueryUpgradedConsensusStateRequest.json b/source/json_tables/cosmos/upgrade/QueryUpgradedConsensusStateRequest.json new file mode 100644 index 00000000..f108e9c0 --- /dev/null +++ b/source/json_tables/cosmos/upgrade/QueryUpgradedConsensusStateRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "last_height", + "Type": "int64", + "Description": "last height of the current chain must be sent in request as this is the height under which next consensus state is stored", + "Required": "Yes" + } +] diff --git a/source/json_tables/cosmos/upgrade/QueryUpgradedConsensusStateResponse.json b/source/json_tables/cosmos/upgrade/QueryUpgradedConsensusStateResponse.json new file mode 100644 index 00000000..04c75d09 --- /dev/null +++ b/source/json_tables/cosmos/upgrade/QueryUpgradedConsensusStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "upgraded_consensus_state", + "Type": "byte array", + "Description": "Since: cosmos-sdk 0.43" + } +] diff --git a/source/json_tables/cosmos/upgrade/SoftwareUpgradeProposal.json b/source/json_tables/cosmos/upgrade/SoftwareUpgradeProposal.json new file mode 100644 index 00000000..bd758de1 --- /dev/null +++ b/source/json_tables/cosmos/upgrade/SoftwareUpgradeProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "title of the proposal" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "description of the proposal" + }, + { + "Parameter": "plan", + "Type": "Plan", + "Description": "plan of the proposal" + } +] diff --git a/source/json_tables/errors/authz.json b/source/json_tables/errors/authz.json new file mode 100644 index 00000000..ad549ae8 --- /dev/null +++ b/source/json_tables/errors/authz.json @@ -0,0 +1,34 @@ +[ + { + "Error Code": 2, + "Description": "authorization not found" + }, + { + "Error Code": 3, + "Description": "expiration time of authorization should be more than current time" + }, + { + "Error Code": 4, + "Description": "unknown authorization type" + }, + { + "Error Code": 5, + "Description": "grant key not found" + }, + { + "Error Code": 6, + "Description": "authorization expired" + }, + { + "Error Code": 7, + "Description": "grantee and granter should be different" + }, + { + "Error Code": 9, + "Description": "authorization can be given to msg with only one signer" + }, + { + "Error Code": 12, + "Description": "max tokens should be positive" + } +] diff --git a/source/json_tables/errors/bank.json b/source/json_tables/errors/bank.json new file mode 100644 index 00000000..124ac75f --- /dev/null +++ b/source/json_tables/errors/bank.json @@ -0,0 +1,34 @@ +[ + { + "Error Code": 2, + "Description": "no inputs to send transaction" + }, + { + "Error Code": 3, + "Description": "no outputs to send transaction" + }, + { + "Error Code": 4, + "Description": "sum inputs != sum outputs" + }, + { + "Error Code": 5, + "Description": "send transactions are disabled" + }, + { + "Error Code": 6, + "Description": "client denom metadata not found" + }, + { + "Error Code": 7, + "Description": "invalid key" + }, + { + "Error Code": 8, + "Description": "duplicate entry" + }, + { + "Error Code": 9, + "Description": "multiple senders not allowed" + } +] diff --git a/source/json_tables/errors/crisis.json b/source/json_tables/errors/crisis.json new file mode 100644 index 00000000..cf66d884 --- /dev/null +++ b/source/json_tables/errors/crisis.json @@ -0,0 +1,10 @@ +[ + { + "Error Code": 2, + "Description": "sender address is empty" + }, + { + "Error Code": 3, + "Description": "unknown invariant" + } +] diff --git a/source/json_tables/errors/distribution.json b/source/json_tables/errors/distribution.json new file mode 100644 index 00000000..8632e2a2 --- /dev/null +++ b/source/json_tables/errors/distribution.json @@ -0,0 +1,50 @@ +[ + { + "Error Code": 2, + "Description": "delegator address is empty" + }, + { + "Error Code": 3, + "Description": "withdraw address is empty" + }, + { + "Error Code": 4, + "Description": "validator address is empty" + }, + { + "Error Code": 5, + "Description": "no delegation distribution info" + }, + { + "Error Code": 6, + "Description": "no validator distribution info" + }, + { + "Error Code": 7, + "Description": "no validator commission to withdraw" + }, + { + "Error Code": 8, + "Description": "set withdraw address disabled" + }, + { + "Error Code": 9, + "Description": "community pool does not have sufficient coins to distribute" + }, + { + "Error Code": 10, + "Description": "invalid community pool spend proposal amount" + }, + { + "Error Code": 11, + "Description": "invalid community pool spend proposal recipient" + }, + { + "Error Code": 12, + "Description": "validator does not exist" + }, + { + "Error Code": 13, + "Description": "delegation does not exist" + } +] diff --git a/source/json_tables/errors/evidence.json b/source/json_tables/errors/evidence.json new file mode 100644 index 00000000..eb6ae3a2 --- /dev/null +++ b/source/json_tables/errors/evidence.json @@ -0,0 +1,14 @@ +[ + { + "Error Code": 2, + "Description": "unregistered handler for evidence type" + }, + { + "Error Code": 3, + "Description": "invalid evidence" + }, + { + "Error Code": 5, + "Description": "evidence already exists" + } +] diff --git a/source/json_tables/errors/feegrant.json b/source/json_tables/errors/feegrant.json new file mode 100644 index 00000000..846d69a4 --- /dev/null +++ b/source/json_tables/errors/feegrant.json @@ -0,0 +1,26 @@ +[ + { + "Error Code": 2, + "Description": "fee limit exceeded" + }, + { + "Error Code": 3, + "Description": "fee allowance expired" + }, + { + "Error Code": 4, + "Description": "invalid duration" + }, + { + "Error Code": 5, + "Description": "no allowance" + }, + { + "Error Code": 6, + "Description": "allowed messages are empty" + }, + { + "Error Code": 7, + "Description": "message not allowed" + } +] diff --git a/source/json_tables/errors/gov.json b/source/json_tables/errors/gov.json new file mode 100644 index 00000000..2e0002ae --- /dev/null +++ b/source/json_tables/errors/gov.json @@ -0,0 +1,74 @@ +[ + { + "Error Code": 3, + "Description": "inactive proposal" + }, + { + "Error Code": 4, + "Description": "proposal already active" + }, + { + "Error Code": 5, + "Description": "invalid proposal content" + }, + { + "Error Code": 6, + "Description": "invalid proposal type" + }, + { + "Error Code": 7, + "Description": "invalid vote option" + }, + { + "Error Code": 8, + "Description": "invalid genesis state" + }, + { + "Error Code": 9, + "Description": "no handler exists for proposal type" + }, + { + "Error Code": 10, + "Description": "proposal message not recognized by router" + }, + { + "Error Code": 11, + "Description": "no messages proposed" + }, + { + "Error Code": 12, + "Description": "invalid proposal message" + }, + { + "Error Code": 13, + "Description": "expected gov account as only signer for proposal message" + }, + { + "Error Code": 15, + "Description": "metadata too long" + }, + { + "Error Code": 16, + "Description": "minimum deposit is too small" + }, + { + "Error Code": 18, + "Description": "invalid proposer" + }, + { + "Error Code": 20, + "Description": "voting period already ended" + }, + { + "Error Code": 21, + "Description": "invalid proposal" + }, + { + "Error Code": 22, + "Description": "summary too long" + }, + { + "Error Code": 23, + "Description": "invalid deposit denom" + } +] diff --git a/source/json_tables/errors/nft.json b/source/json_tables/errors/nft.json new file mode 100644 index 00000000..80bf53a3 --- /dev/null +++ b/source/json_tables/errors/nft.json @@ -0,0 +1,26 @@ +[ + { + "Error Code": 3, + "Description": "nft class already exists" + }, + { + "Error Code": 4, + "Description": "nft class does not exist" + }, + { + "Error Code": 5, + "Description": "nft already exists" + }, + { + "Error Code": 6, + "Description": "nft does not exist" + }, + { + "Error Code": 7, + "Description": "empty class id" + }, + { + "Error Code": 8, + "Description": "empty nft id" + } +] diff --git a/source/json_tables/errors/slashing.json b/source/json_tables/errors/slashing.json new file mode 100644 index 00000000..8238a4ec --- /dev/null +++ b/source/json_tables/errors/slashing.json @@ -0,0 +1,34 @@ +[ + { + "Error Code": 2, + "Description": "address is not associated with any known validator" + }, + { + "Error Code": 3, + "Description": "validator does not exist for that address" + }, + { + "Error Code": 4, + "Description": "validator still jailed; cannot be unjailed" + }, + { + "Error Code": 5, + "Description": "validator not jailed; cannot be unjailed" + }, + { + "Error Code": 6, + "Description": "validator has no self-delegation; cannot be unjailed" + }, + { + "Error Code": 7, + "Description": "validator's self delegation less than minimum; cannot be unjailed" + }, + { + "Error Code": 8, + "Description": "no validator signing info found" + }, + { + "Error Code": 9, + "Description": "validator already tombstoned" + } +] diff --git a/source/json_tables/errors/staking.json b/source/json_tables/errors/staking.json new file mode 100644 index 00000000..f43535f0 --- /dev/null +++ b/source/json_tables/errors/staking.json @@ -0,0 +1,182 @@ +[ + { + "Error Code": 2, + "Description": "empty validator address" + }, + { + "Error Code": 3, + "Description": "validator does not exist" + }, + { + "Error Code": 4, + "Description": "validator already exist for this operator address; must use new validator operator address" + }, + { + "Error Code": 5, + "Description": "validator already exist for this pubkey; must use new validator pubkey" + }, + { + "Error Code": 6, + "Description": "validator pubkey type is not supported" + }, + { + "Error Code": 7, + "Description": "validator for this address is currently jailed" + }, + { + "Error Code": 8, + "Description": "failed to remove validator" + }, + { + "Error Code": 9, + "Description": "commission must be positive" + }, + { + "Error Code": 10, + "Description": "commission cannot be more than 100%" + }, + { + "Error Code": 11, + "Description": "commission cannot be more than the max rate" + }, + { + "Error Code": 12, + "Description": "commission cannot be changed more than once in 24h" + }, + { + "Error Code": 13, + "Description": "commission change rate must be positive" + }, + { + "Error Code": 14, + "Description": "commission change rate cannot be more than the max rate" + }, + { + "Error Code": 15, + "Description": "commission cannot be changed more than max change rate" + }, + { + "Error Code": 16, + "Description": "validator's self delegation must be greater than their minimum self delegation" + }, + { + "Error Code": 17, + "Description": "minimum self delegation cannot be decrease" + }, + { + "Error Code": 18, + "Description": "empty delegator address" + }, + { + "Error Code": 19, + "Description": "no delegation for (address, validator) tuple" + }, + { + "Error Code": 20, + "Description": "delegator does not exist with address" + }, + { + "Error Code": 21, + "Description": "delegator does not contain delegation" + }, + { + "Error Code": 22, + "Description": "insufficient delegation shares" + }, + { + "Error Code": 23, + "Description": "cannot delegate to an empty validator" + }, + { + "Error Code": 24, + "Description": "not enough delegation shares" + }, + { + "Error Code": 25, + "Description": "entry not mature" + }, + { + "Error Code": 26, + "Description": "no unbonding delegation found" + }, + { + "Error Code": 27, + "Description": "too many unbonding delegation entries for (delegator, validator) tuple" + }, + { + "Error Code": 28, + "Description": "no redelegation found" + }, + { + "Error Code": 29, + "Description": "cannot redelegate to the same validator" + }, + { + "Error Code": 30, + "Description": "too few tokens to redelegate (truncates to zero tokens)" + }, + { + "Error Code": 31, + "Description": "redelegation destination validator not found" + }, + { + "Error Code": 32, + "Description": "redelegation to this validator already in progress; first redelegation to this validator must complete before next redelegation" + }, + { + "Error Code": 33, + "Description": "too many redelegation entries for (delegator, src-validator, dst-validator) tuple" + }, + { + "Error Code": 34, + "Description": "cannot delegate to validators with invalid (zero) ex-rate" + }, + { + "Error Code": 35, + "Description": "both shares amount and shares percent provided" + }, + { + "Error Code": 36, + "Description": "neither shares amount nor shares percent provided" + }, + { + "Error Code": 37, + "Description": "invalid historical info" + }, + { + "Error Code": 38, + "Description": "no historical info found" + }, + { + "Error Code": 39, + "Description": "empty validator public key" + }, + { + "Error Code": 40, + "Description": "commission cannot be less than min rate" + }, + { + "Error Code": 41, + "Description": "unbonding operation not found" + }, + { + "Error Code": 42, + "Description": "cannot un-hold unbonding operation that is not on hold" + }, + { + "Error Code": 43, + "Description": "expected authority account as only signer for proposal message" + }, + { + "Error Code": 44, + "Description": "redelegation source validator not found" + }, + { + "Error Code": 45, + "Description": "unbonding type not found" + }, + { + "Error Code": 70, + "Description": "commission rate too small" + } +] diff --git a/source/json_tables/errors/upgrade.json b/source/json_tables/errors/upgrade.json new file mode 100644 index 00000000..2269dc86 --- /dev/null +++ b/source/json_tables/errors/upgrade.json @@ -0,0 +1,22 @@ +[ + { + "Error Code": 2, + "Description": "module version not found" + }, + { + "Error Code": 3, + "Description": "upgrade plan not found" + }, + { + "Error Code": 4, + "Description": "upgraded client not found" + }, + { + "Error Code": 5, + "Description": "upgraded consensus state not found" + }, + { + "Error Code": 6, + "Description": "expected authority account as only signer for proposal message" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/ABCIAttribute.json b/source/json_tables/indexer_new/event_provider_api/ABCIAttribute.json new file mode 100644 index 00000000..bb3e93a2 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/ABCIAttribute.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "key", + "Type": "string", + "Description": "" + }, + { + "Parameter": "value", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/ABCIEvent.json b/source/json_tables/indexer_new/event_provider_api/ABCIEvent.json new file mode 100644 index 00000000..ef296f54 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/ABCIEvent.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "type", + "Type": "string", + "Description": "" + }, + { + "Parameter": "attributes", + "Type": "ABCIAttribute array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/ABCIResponseDeliverTx.json b/source/json_tables/indexer_new/event_provider_api/ABCIResponseDeliverTx.json new file mode 100644 index 00000000..7be80577 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/ABCIResponseDeliverTx.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "code", + "Type": "int32", + "Description": "" + }, + { + "Parameter": "log", + "Type": "string", + "Description": "" + }, + { + "Parameter": "info", + "Type": "string", + "Description": "" + }, + { + "Parameter": "gas_wanted", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "gas_used", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "events", + "Type": "ABCIEvent array", + "Description": "" + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "" + }, + { + "Parameter": "tx_hash", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/BasicBlockInfo.json b/source/json_tables/indexer_new/event_provider_api/BasicBlockInfo.json new file mode 100644 index 00000000..142ef3cc --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/BasicBlockInfo.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "Block height" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Block timestamp in UNIX millis." + }, + { + "Parameter": "time", + "Type": "string", + "Description": "Block time in RFC3339 format." + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/Block.json b/source/json_tables/indexer_new/event_provider_api/Block.json new file mode 100644 index 00000000..3282b9a1 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/Block.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "version", + "Type": "string", + "Description": "" + }, + { + "Parameter": "events", + "Type": "BlockEvent array", + "Description": "Processed block events in the block" + }, + { + "Parameter": "in_sync", + "Type": "bool", + "Description": "Indicates whether the block is the latest one available in the event provider" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/BlockEvent.json b/source/json_tables/indexer_new/event_provider_api/BlockEvent.json new file mode 100644 index 00000000..4f78d35d --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/BlockEvent.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "type_url", + "Type": "string", + "Description": "Event type" + }, + { + "Parameter": "value", + "Type": "byte array", + "Description": "Event data" + }, + { + "Parameter": "tx_hash", + "Type": "byte array", + "Description": "TX hash" + }, + { + "Parameter": "mode", + "Type": "string", + "Description": "Set only if it's a BeginBlock or EndBlock event" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/BlockEventsRPC.json b/source/json_tables/indexer_new/event_provider_api/BlockEventsRPC.json new file mode 100644 index 00000000..8da712e6 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/BlockEventsRPC.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "types", + "Type": "string array", + "Description": "Array of event types" + }, + { + "Parameter": "events", + "Type": "][byte array", + "Description": "Array of parsed events" + }, + { + "Parameter": "tx_hashes", + "Type": "map[int32][]byte", + "Description": "Map of event index - tx hash" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsAtHeightRequest.json b/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsAtHeightRequest.json new file mode 100644 index 00000000..cf0bb5ba --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsAtHeightRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "height", + "Type": "int32", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsAtHeightResponse.json b/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsAtHeightResponse.json new file mode 100644 index 00000000..5ae53d82 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsAtHeightResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "v", + "Type": "string", + "Description": "Response version." + }, + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "e", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "raw_block", + "Type": "RawBlock", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsRequest.json b/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsRequest.json new file mode 100644 index 00000000..5db14c59 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "height", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "event_types", + "Type": "string array", + "Description": "Array of event types", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsResponse.json b/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsResponse.json new file mode 100644 index 00000000..5ae53d82 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetABCIBlockEventsResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "v", + "Type": "string", + "Description": "Response version." + }, + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "e", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "raw_block", + "Type": "RawBlock", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetBlockEventsRPCRequest.json b/source/json_tables/indexer_new/event_provider_api/GetBlockEventsRPCRequest.json new file mode 100644 index 00000000..78846a24 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetBlockEventsRPCRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "backend", + "Type": "string", + "Description": "Select backend processor", + "Required": "Yes" + }, + { + "Parameter": "height", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "human_readable", + "Type": "bool", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetBlockEventsRPCResponse.json b/source/json_tables/indexer_new/event_provider_api/GetBlockEventsRPCResponse.json new file mode 100644 index 00000000..d4ca9ff0 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetBlockEventsRPCResponse.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "v", + "Type": "string", + "Description": "Response version." + }, + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "e", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "BlockEventsRPC", + "Description": "" + }, + { + "Parameter": "block", + "Type": "BasicBlockInfo", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetCustomEventsRPCRequest.json b/source/json_tables/indexer_new/event_provider_api/GetCustomEventsRPCRequest.json new file mode 100644 index 00000000..172f6e13 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetCustomEventsRPCRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "backend", + "Type": "string", + "Description": "Select backend processor", + "Required": "Yes" + }, + { + "Parameter": "height", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "events", + "Type": "string", + "Description": "Specify custom events to get", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetCustomEventsRPCResponse.json b/source/json_tables/indexer_new/event_provider_api/GetCustomEventsRPCResponse.json new file mode 100644 index 00000000..d4ca9ff0 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetCustomEventsRPCResponse.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "v", + "Type": "string", + "Description": "Response version." + }, + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "e", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "BlockEventsRPC", + "Description": "" + }, + { + "Parameter": "block", + "Type": "BasicBlockInfo", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/GetLatestHeightResponse.json b/source/json_tables/indexer_new/event_provider_api/GetLatestHeightResponse.json new file mode 100644 index 00000000..6fac15d8 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/GetLatestHeightResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "v", + "Type": "string", + "Description": "Response version." + }, + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "e", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "LatestBlockHeight", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/LatestBlockHeight.json b/source/json_tables/indexer_new/event_provider_api/LatestBlockHeight.json new file mode 100644 index 00000000..b9aa3fd6 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/LatestBlockHeight.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "time", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/RawBlock.json b/source/json_tables/indexer_new/event_provider_api/RawBlock.json new file mode 100644 index 00000000..1a20ec28 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/RawBlock.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "block_time", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_timestamp", + "Type": "int64", + "Description": "Block timestamp in UNIX millis." + }, + { + "Parameter": "txs_results", + "Type": "ABCIResponseDeliverTx array", + "Description": "" + }, + { + "Parameter": "begin_block_events", + "Type": "ABCIEvent array", + "Description": "" + }, + { + "Parameter": "end_block_events", + "Type": "ABCIEvent array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/StreamBlockEventsRequest.json b/source/json_tables/indexer_new/event_provider_api/StreamBlockEventsRequest.json new file mode 100644 index 00000000..fe123506 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/StreamBlockEventsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "backend", + "Type": "string", + "Description": "Select backend processor", + "Required": "Yes" + }, + { + "Parameter": "height", + "Type": "int32", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/StreamBlockEventsResponse.json b/source/json_tables/indexer_new/event_provider_api/StreamBlockEventsResponse.json new file mode 100644 index 00000000..4b4a659a --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/StreamBlockEventsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "blocks", + "Type": "Block array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/event_provider_api/StreamLatestHeightResponse.json b/source/json_tables/indexer_new/event_provider_api/StreamLatestHeightResponse.json new file mode 100644 index 00000000..b9aa3fd6 --- /dev/null +++ b/source/json_tables/indexer_new/event_provider_api/StreamLatestHeightResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "time", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/health/GetStatusResponse.json b/source/json_tables/indexer_new/health/GetStatusResponse.json new file mode 100644 index 00000000..773f5f31 --- /dev/null +++ b/source/json_tables/indexer_new/health/GetStatusResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "errmsg", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "HealthStatus", + "Description": "" + }, + { + "Parameter": "status", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/health/HealthStatus.json b/source/json_tables/indexer_new/health/HealthStatus.json new file mode 100644 index 00000000..0ab84878 --- /dev/null +++ b/source/json_tables/indexer_new/health/HealthStatus.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "local_height", + "Type": "int32", + "Description": "Block height from local mongo exchange db." + }, + { + "Parameter": "local_timestamp", + "Type": "int32", + "Description": "block timestamp from local mongo exchange db." + }, + { + "Parameter": "horacle_height", + "Type": "int32", + "Description": "block height from Horacle service." + }, + { + "Parameter": "horacle_timestamp", + "Type": "int32", + "Description": "block timestamp from Horacle service." + }, + { + "Parameter": "migration_last_version", + "Type": "int32", + "Description": "Migration version of the database." + }, + { + "Parameter": "ep_height", + "Type": "int32", + "Description": "Block height from event provider service." + }, + { + "Parameter": "ep_timestamp", + "Type": "int32", + "Description": "Block UNIX timestamp from event provider service." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/AccountPortfolio.json b/source/json_tables/indexer_new/injective_accounts_rpc/AccountPortfolio.json new file mode 100644 index 00000000..e3365919 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/AccountPortfolio.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "portfolio_value", + "Type": "string", + "Description": "The account's portfolio value in USD." + }, + { + "Parameter": "available_balance", + "Type": "string", + "Description": "The account's available balance value in USD." + }, + { + "Parameter": "locked_balance", + "Type": "string", + "Description": "The account's locked balance value in USD." + }, + { + "Parameter": "unrealized_pnl", + "Type": "string", + "Description": "The account's total unrealized PnL value in USD." + }, + { + "Parameter": "subaccounts", + "Type": "SubaccountPortfolio array", + "Description": "List of all subaccounts' portfolio" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/Coin.json b/source/json_tables/indexer_new/injective_accounts_rpc/Coin.json new file mode 100644 index 00000000..8fa4b17b --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/Coin.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of the coin" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "usd_value", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/CosmosCoin.json b/source/json_tables/indexer_new/injective_accounts_rpc/CosmosCoin.json new file mode 100644 index 00000000..f47834b3 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/CosmosCoin.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Coin denominator" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Coin amount (big int)" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeLimitOrder.json b/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeLimitOrder.json new file mode 100644 index 00000000..b826fa10 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeLimitOrder.json @@ -0,0 +1,112 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "is_reduce_only", + "Type": "bool", + "Description": "True if the order is a reduce-only order" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Margin of the order" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Price of the order" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the order" + }, + { + "Parameter": "unfilled_quantity", + "Type": "string", + "Description": "The amount of the quantity remaining unfilled" + }, + { + "Parameter": "trigger_price", + "Type": "string", + "Description": "Trigger price is the trigger price used by stop/take orders" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Order state" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "order_number", + "Type": "int64", + "Description": "Order number of subaccount" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "Order type" + }, + { + "Parameter": "is_conditional", + "Type": "bool", + "Description": "Order type" + }, + { + "Parameter": "trigger_at", + "Type": "uint64", + "Description": "Trigger timestamp, only exists for conditional orders" + }, + { + "Parameter": "placed_order_hash", + "Type": "string", + "Description": "OrderHash of order that is triggered by this conditional order" + }, + { + "Parameter": "execution_type", + "Type": "string", + "Description": "Execution type of conditional order" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction Hash where order is created. Not all orders have this field" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeOrderHistory.json b/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeOrderHistory.json new file mode 100644 index 00000000..7a41d158 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeOrderHistory.json @@ -0,0 +1,107 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Spot Market ID is keccak265(baseDenom + quoteDenom)" + }, + { + "Parameter": "is_active", + "Type": "bool", + "Description": "active state of the order" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "execution_type", + "Type": "string", + "Description": "The execution type" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Price of the order" + }, + { + "Parameter": "trigger_price", + "Type": "string", + "Description": "Trigger price" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the order" + }, + { + "Parameter": "filled_quantity", + "Type": "string", + "Description": "Filled amount" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Order state" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "is_reduce_only", + "Type": "bool", + "Description": "True if an order is reduce only" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Order direction (order side)" + }, + { + "Parameter": "is_conditional", + "Type": "bool", + "Description": "True if this is conditional order, otherwise false" + }, + { + "Parameter": "trigger_at", + "Type": "uint64", + "Description": "Trigger timestamp in unix milli" + }, + { + "Parameter": "placed_order_hash", + "Type": "string", + "Description": "Order hash placed when this triggers" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Order's margin" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction Hash where order is created. Not all orders have this field" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeTrade.json b/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeTrade.json new file mode 100644 index 00000000..1a57d909 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/DerivativeTrade.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Order hash." + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that executed the trade" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "The ID of the market that this trade is in" + }, + { + "Parameter": "trade_execution_type", + "Type": "string", + "Description": "The execution type of the trade" + }, + { + "Parameter": "is_liquidation", + "Type": "bool", + "Description": "True if the trade is a liquidation" + }, + { + "Parameter": "position_delta", + "Type": "PositionDelta", + "Description": "Position Delta from the trade" + }, + { + "Parameter": "payout", + "Type": "string", + "Description": "The payout associated with the trade" + }, + { + "Parameter": "fee", + "Type": "string", + "Description": "The fee associated with the trade" + }, + { + "Parameter": "executed_at", + "Type": "int64", + "Description": "Timestamp of trade execution in UNIX millis" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "A unique string that helps differentiate between trades" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Trade's execution side, marker/taker" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + }, + { + "Parameter": "pnl", + "Type": "string", + "Description": "Profit and loss of the trade" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/FundingPayment.json b/source/json_tables/indexer_new/injective_accounts_rpc/FundingPayment.json new file mode 100644 index 00000000..494aa13f --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/FundingPayment.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that the position belongs to" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Amount of the funding payment" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Timestamp of funding payment in UNIX millis" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/FundingPaymentResult.json b/source/json_tables/indexer_new/injective_accounts_rpc/FundingPaymentResult.json new file mode 100644 index 00000000..df39c481 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/FundingPaymentResult.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "funding_payments", + "Type": "FundingPayment", + "Description": "Funding payments of the account" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Funding payments type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/OrderHistoryResult.json b/source/json_tables/indexer_new/injective_accounts_rpc/OrderHistoryResult.json new file mode 100644 index 00000000..446b7575 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/OrderHistoryResult.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "spot_order_history", + "Type": "SpotOrderHistory", + "Description": "Spot order history" + }, + { + "Parameter": "derivative_order_history", + "Type": "DerivativeOrderHistory", + "Description": "Derivative order history" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/OrderResult.json b/source/json_tables/indexer_new/injective_accounts_rpc/OrderResult.json new file mode 100644 index 00000000..a01382e9 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/OrderResult.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Executed orders update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "spot_order", + "Type": "SpotLimitOrder", + "Description": "Updated spot market order" + }, + { + "Parameter": "derivative_order", + "Type": "DerivativeLimitOrder", + "Description": "Updated derivative market order" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/OrderStateRecord.json b/source/json_tables/indexer_new/injective_accounts_rpc/OrderStateRecord.json new file mode 100644 index 00000000..102bce96 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/OrderStateRecord.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "The Market ID of the order" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "The type of the order" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "The state (status) of the order" + }, + { + "Parameter": "quantity_filled", + "Type": "string", + "Description": "The filled quantity of the order" + }, + { + "Parameter": "quantity_remaining", + "Type": "string", + "Description": "The filled quantity of the order" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Order prices" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Margin for derivative order" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/OrderStatesRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/OrderStatesRequest.json new file mode 100644 index 00000000..e5c08519 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/OrderStatesRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "spot_order_hashes", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "derivative_order_hashes", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/OrderStatesResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/OrderStatesResponse.json new file mode 100644 index 00000000..dde52995 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/OrderStatesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "spot_order_states", + "Type": "OrderStateRecord array", + "Description": "List of the spot order state records" + }, + { + "Parameter": "derivative_order_states", + "Type": "OrderStateRecord array", + "Description": "List of the derivative order state records" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/Paging.json b/source/json_tables/indexer_new/injective_accounts_rpc/Paging.json new file mode 100644 index 00000000..d11d26dc --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/Paging.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "total", + "Type": "int64", + "Description": "total number of txs saved in database" + }, + { + "Parameter": "from", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "to", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "count_by_subaccount", + "Type": "int64", + "Description": "count entries by subaccount, serving some places on helix" + }, + { + "Parameter": "next", + "Type": "string array", + "Description": "array of tokens to navigate to the next pages" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/PortfolioRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/PortfolioRequest.json new file mode 100644 index 00000000..bfd7f33d --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/PortfolioRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/PortfolioResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/PortfolioResponse.json new file mode 100644 index 00000000..729c0e27 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/PortfolioResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "portfolio", + "Type": "AccountPortfolio", + "Description": "The portfolio of this account" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/Position.json b/source/json_tables/indexer_new/injective_accounts_rpc/Position.json new file mode 100644 index 00000000..d24573fe --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/Position.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker of the derivative market" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that the position belongs to" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Direction of the position" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the position" + }, + { + "Parameter": "entry_price", + "Type": "string", + "Description": "Price of the position" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Margin of the position" + }, + { + "Parameter": "liquidation_price", + "Type": "string", + "Description": "LiquidationPrice of the position" + }, + { + "Parameter": "mark_price", + "Type": "string", + "Description": "MarkPrice of the position" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Position updated timestamp in UNIX millis." + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Position created timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/PositionDelta.json b/source/json_tables/indexer_new/injective_accounts_rpc/PositionDelta.json new file mode 100644 index 00000000..150f250c --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/PositionDelta.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "trade_direction", + "Type": "string", + "Description": "The direction the trade" + }, + { + "Parameter": "execution_price", + "Type": "string", + "Description": "Execution Price of the trade." + }, + { + "Parameter": "execution_quantity", + "Type": "string", + "Description": "Execution Quantity of the trade." + }, + { + "Parameter": "execution_margin", + "Type": "string", + "Description": "Execution Margin of the trade." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/PositionsResult.json b/source/json_tables/indexer_new/injective_accounts_rpc/PositionsResult.json new file mode 100644 index 00000000..91972e50 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/PositionsResult.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "position", + "Type": "Position", + "Description": "Updated derivative Position" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/PriceLevel.json b/source/json_tables/indexer_new/injective_accounts_rpc/PriceLevel.json new file mode 100644 index 00000000..d7ecf738 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/PriceLevel.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "Price number of the price level." + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the price level." + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Price level last updated timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/Reward.json b/source/json_tables/indexer_new/injective_accounts_rpc/Reward.json new file mode 100644 index 00000000..bfddea82 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/Reward.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address" + }, + { + "Parameter": "rewards", + "Type": "Coin array", + "Description": "Reward coins distributed" + }, + { + "Parameter": "distributed_at", + "Type": "int64", + "Description": "Rewards distribution timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/RewardsRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/RewardsRequest.json new file mode 100644 index 00000000..5581dd03 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/RewardsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "epoch", + "Type": "int64", + "Description": "The distribution epoch sequence number. -1 for latest.", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address for the rewards distribution", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/RewardsResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/RewardsResponse.json new file mode 100644 index 00000000..5df3eee3 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/RewardsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "rewards", + "Type": "Reward array", + "Description": "The trading rewards distributed" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SpotLimitOrder.json b/source/json_tables/indexer_new/injective_accounts_rpc/SpotLimitOrder.json new file mode 100644 index 00000000..9b70d7bf --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SpotLimitOrder.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Spot Market ID is keccak265(baseDenom + quoteDenom)" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Price of the order" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the order" + }, + { + "Parameter": "unfilled_quantity", + "Type": "string", + "Description": "The amount of the quantity remaining unfilled" + }, + { + "Parameter": "trigger_price", + "Type": "string", + "Description": "Trigger price is the trigger price used by stop/take orders. 0 if the trigger price is not set." + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Order state" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction Hash where order is created. Not all orders have this field" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SpotOrderHistory.json b/source/json_tables/indexer_new/injective_accounts_rpc/SpotOrderHistory.json new file mode 100644 index 00000000..0a476fe8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SpotOrderHistory.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Spot Market ID is keccak265(baseDenom + quoteDenom)" + }, + { + "Parameter": "is_active", + "Type": "bool", + "Description": "active state of the order" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "execution_type", + "Type": "string", + "Description": "The execution type" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Price of the order" + }, + { + "Parameter": "trigger_price", + "Type": "string", + "Description": "Trigger price" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the order" + }, + { + "Parameter": "filled_quantity", + "Type": "string", + "Description": "Filled amount" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Order state" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Order direction (order side)" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction Hash where order is created. Not all orders have this field" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SpotTrade.json b/source/json_tables/indexer_new/injective_accounts_rpc/SpotTrade.json new file mode 100644 index 00000000..c11ed996 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SpotTrade.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Maker order hash." + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that executed the trade" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "The ID of the market that this trade is in" + }, + { + "Parameter": "trade_execution_type", + "Type": "string", + "Description": "The execution type of the trade" + }, + { + "Parameter": "trade_direction", + "Type": "string", + "Description": "The direction the trade" + }, + { + "Parameter": "price", + "Type": "PriceLevel", + "Description": "Price level at which trade has been executed" + }, + { + "Parameter": "fee", + "Type": "string", + "Description": "The fee associated with the trade (quote asset denom)" + }, + { + "Parameter": "executed_at", + "Type": "int64", + "Description": "Timestamp of trade execution in UNIX millis" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "A unique string that helps differentiate between trades" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Trade's execution side, marker/taker" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/StreamAccountDataRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/StreamAccountDataRequest.json new file mode 100644 index 00000000..6484ea45 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/StreamAccountDataRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/StreamAccountDataResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/StreamAccountDataResponse.json new file mode 100644 index 00000000..8394fac1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/StreamAccountDataResponse.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "subaccount_balance", + "Type": "SubaccountBalanceResult", + "Description": "" + }, + { + "Parameter": "position", + "Type": "PositionsResult", + "Description": "" + }, + { + "Parameter": "trade", + "Type": "TradeResult", + "Description": "" + }, + { + "Parameter": "order", + "Type": "OrderResult", + "Description": "" + }, + { + "Parameter": "order_history", + "Type": "OrderHistoryResult", + "Description": "" + }, + { + "Parameter": "funding_payment", + "Type": "FundingPaymentResult", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/StreamSubaccountBalanceRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/StreamSubaccountBalanceRequest.json new file mode 100644 index 00000000..55ae56a9 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/StreamSubaccountBalanceRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "denoms", + "Type": "string array", + "Description": "Filter balances by denoms. If not set, the balances of all the denoms for the subaccount are provided.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/StreamSubaccountBalanceResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/StreamSubaccountBalanceResponse.json new file mode 100644 index 00000000..1e85029b --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/StreamSubaccountBalanceResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "balance", + "Type": "SubaccountBalance", + "Description": "Subaccount balance" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalance.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalance.json new file mode 100644 index 00000000..9286c17f --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalance.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "Related subaccount ID" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address, owner of this subaccount" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "Coin denom on the chain." + }, + { + "Parameter": "deposit", + "Type": "SubaccountDeposit", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceEndpointRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceEndpointRequest.json new file mode 100644 index 00000000..4ecc23e7 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceEndpointRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "Specify denom to get balance", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceEndpointResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceEndpointResponse.json new file mode 100644 index 00000000..3da2168a --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceEndpointResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance", + "Type": "SubaccountBalance", + "Description": "Subaccount balance" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceResult.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceResult.json new file mode 100644 index 00000000..1e85029b --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceResult.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "balance", + "Type": "SubaccountBalance", + "Description": "Subaccount balance" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceTransfer.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceTransfer.json new file mode 100644 index 00000000..352e42cb --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalanceTransfer.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "transfer_type", + "Type": "string", + "Description": "Type of the subaccount balance transfer" + }, + { + "Parameter": "src_subaccount_id", + "Type": "string", + "Description": "Subaccount ID of the sending side" + }, + { + "Parameter": "src_account_address", + "Type": "string", + "Description": "Account address of the sending side" + }, + { + "Parameter": "dst_subaccount_id", + "Type": "string", + "Description": "Subaccount ID of the receiving side" + }, + { + "Parameter": "dst_account_address", + "Type": "string", + "Description": "Account address of the receiving side" + }, + { + "Parameter": "amount", + "Type": "CosmosCoin", + "Description": "Coin amount of the transfer" + }, + { + "Parameter": "executed_at", + "Type": "int64", + "Description": "Timestamp of the transfer in UNIX millis" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalancesListRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalancesListRequest.json new file mode 100644 index 00000000..55ae56a9 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalancesListRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "denoms", + "Type": "string array", + "Description": "Filter balances by denoms. If not set, the balances of all the denoms for the subaccount are provided.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalancesListResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalancesListResponse.json new file mode 100644 index 00000000..34819b9f --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountBalancesListResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balances", + "Type": "SubaccountBalance array", + "Description": "List of subaccount balances" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountDeposit.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountDeposit.json new file mode 100644 index 00000000..6f45f42a --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountDeposit.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "total_balance", + "Type": "string", + "Description": "" + }, + { + "Parameter": "available_balance", + "Type": "string", + "Description": "" + }, + { + "Parameter": "total_balance_usd", + "Type": "string", + "Description": "" + }, + { + "Parameter": "available_balance_usd", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountHistoryRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountHistoryRequest.json new file mode 100644 index 00000000..eca9ba0e --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountHistoryRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the history from", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "Filter history by denom", + "Required": "Yes" + }, + { + "Parameter": "transfer_types", + "Type": "string array", + "Description": "Filter history by transfer type", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "Upper bound of account transfer history's executedAt", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountHistoryResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountHistoryResponse.json new file mode 100644 index 00000000..b948d258 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountHistoryResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "transfers", + "Type": "SubaccountBalanceTransfer array", + "Description": "List of subaccount transfers" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountOrderSummaryRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountOrderSummaryRequest.json new file mode 100644 index 00000000..d0c23073 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountOrderSummaryRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the summary from", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId is limiting order summary to specific market only", + "Required": "Yes" + }, + { + "Parameter": "order_direction", + "Type": "string", + "Description": "Filter by direction of the orders", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountOrderSummaryResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountOrderSummaryResponse.json new file mode 100644 index 00000000..fdf41444 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountOrderSummaryResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "spot_orders_total", + "Type": "int64", + "Description": "Total count of subaccount's spot orders in given market and direction" + }, + { + "Parameter": "derivative_orders_total", + "Type": "int64", + "Description": "Total count of subaccount's derivative orders in given market and direction" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountPortfolio.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountPortfolio.json new file mode 100644 index 00000000..efeb6e0b --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountPortfolio.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The ID of this subaccount" + }, + { + "Parameter": "available_balance", + "Type": "string", + "Description": "The subaccount's available balance value in USD." + }, + { + "Parameter": "locked_balance", + "Type": "string", + "Description": "The subaccount's locked balance value in USD." + }, + { + "Parameter": "unrealized_pnl", + "Type": "string", + "Description": "The subaccount's total unrealized PnL value in USD." + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountsListRequest.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountsListRequest.json new file mode 100644 index 00000000..5290fbcd --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountsListRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address, the subaccounts owner", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountsListResponse.json b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountsListResponse.json new file mode 100644 index 00000000..daf254e6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/SubaccountsListResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "subaccounts", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_accounts_rpc/TradeResult.json b/source/json_tables/indexer_new/injective_accounts_rpc/TradeResult.json new file mode 100644 index 00000000..53152773 --- /dev/null +++ b/source/json_tables/indexer_new/injective_accounts_rpc/TradeResult.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Executed trades update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "spot_trade", + "Type": "SpotTrade", + "Description": "New spot market trade" + }, + { + "Parameter": "derivative_trade", + "Type": "DerivativeTrade", + "Description": "New derivative market trade" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/AccountStatsRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/AccountStatsRequest.json new file mode 100644 index 00000000..3af302c8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/AccountStatsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/AccountStatsResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/AccountStatsResponse.json new file mode 100644 index 00000000..bccf2271 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/AccountStatsResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "Account address" + }, + { + "Parameter": "pnl", + "Type": "float64", + "Description": "Realized profit and loss (USD)" + }, + { + "Parameter": "volume", + "Type": "float64", + "Description": "Trade volume (USD)" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/BalanceRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/BalanceRequest.json new file mode 100644 index 00000000..5c812694 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/BalanceRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Symbol resolution. Possible resolutions are 1D,1W,1M", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/BalanceResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/BalanceResponse.json new file mode 100644 index 00000000..1655f777 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/BalanceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "historical_balance", + "Type": "HistoricalBalance", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/DenomHoldersRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/DenomHoldersRequest.json new file mode 100644 index 00000000..a180a8b1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/DenomHoldersRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom address", + "Required": "Yes" + }, + { + "Parameter": "token", + "Type": "string", + "Description": "Token for pagination", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/DenomHoldersResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/DenomHoldersResponse.json new file mode 100644 index 00000000..8d21369d --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/DenomHoldersResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "holders", + "Type": "Holder array", + "Description": "" + }, + { + "Parameter": "next", + "Type": "string array", + "Description": "Next tokens for pagination" + }, + { + "Parameter": "total", + "Type": "int32", + "Description": "Total number of holders" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalBalance.json b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalBalance.json new file mode 100644 index 00000000..b3abee18 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalBalance.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "t", + "Type": "int32 array", + "Description": "Time, Unix timestamp (UTC)" + }, + { + "Parameter": "v", + "Type": "float64 array", + "Description": "Balance value" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalRPNL.json b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalRPNL.json new file mode 100644 index 00000000..2060618a --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalRPNL.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "t", + "Type": "int32 array", + "Description": "Time, Unix timestamp (UTC)" + }, + { + "Parameter": "v", + "Type": "float64 array", + "Description": "Realized Profit and Loss value" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTrade.json b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTrade.json new file mode 100644 index 00000000..b850f07d --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTrade.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "Account address" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that executed the trade" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "The ID of the market that this trade is in" + }, + { + "Parameter": "trade_direction", + "Type": "string", + "Description": "The direction the trade" + }, + { + "Parameter": "price", + "Type": "PriceLevel", + "Description": "Price level at which trade has been executed" + }, + { + "Parameter": "fee", + "Type": "string", + "Description": "The fee associated with the trade (quote asset denom)" + }, + { + "Parameter": "executed_at", + "Type": "int64", + "Description": "Timestamp of trade execution in UNIX millis" + }, + { + "Parameter": "executed_height", + "Type": "uint64", + "Description": "Block height of trade execution" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Trade's execution side, maker/taker" + }, + { + "Parameter": "usd_value", + "Type": "string", + "Description": "USD value of the trade at the time of execution" + }, + { + "Parameter": "flags", + "Type": "string array", + "Description": "A list of flag assigned to the trade" + }, + { + "Parameter": "market_type", + "Type": "string", + "Description": "Type of market" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Unique trade ID" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTradesRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTradesRequest.json new file mode 100644 index 00000000..0c964e80 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTradesRequest.json @@ -0,0 +1,44 @@ +[ + { + "Parameter": "from_block", + "Type": "uint64", + "Description": "The starting block height that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_block", + "Type": "uint64", + "Description": "The ending block height that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "from_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "per_page", + "Type": "int32", + "Description": "The number of trades to return per page", + "Required": "Yes" + }, + { + "Parameter": "token", + "Type": "string", + "Description": "Token for pagination", + "Required": "Yes" + }, + { + "Parameter": "account", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTradesResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTradesResponse.json new file mode 100644 index 00000000..a04800ed --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalTradesResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "trades", + "Type": "HistoricalTrade array", + "Description": "" + }, + { + "Parameter": "last_height", + "Type": "uint64", + "Description": "The last block height available in the service" + }, + { + "Parameter": "last_time", + "Type": "int64", + "Description": "The timestamp of the last block available in the service" + }, + { + "Parameter": "next", + "Type": "string array", + "Description": "Next token for pagination" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalVolumes.json b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalVolumes.json new file mode 100644 index 00000000..0e402ffb --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/HistoricalVolumes.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "t", + "Type": "int32 array", + "Description": "Time, Unix timestamp (UTC)" + }, + { + "Parameter": "v", + "Type": "float64 array", + "Description": "Volume value" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/Holder.json b/source/json_tables/indexer_new/injective_archiver_rpc/Holder.json new file mode 100644 index 00000000..59a98497 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/Holder.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address for the holder" + }, + { + "Parameter": "balance", + "Type": "string", + "Description": "The balance of the holder" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/LeaderboardRow.json b/source/json_tables/indexer_new/injective_archiver_rpc/LeaderboardRow.json new file mode 100644 index 00000000..189c6f8d --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/LeaderboardRow.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "Account address" + }, + { + "Parameter": "pnl", + "Type": "float64", + "Description": "Realized profit and loss (USD)" + }, + { + "Parameter": "volume", + "Type": "float64", + "Description": "Trade volume (USD)" + }, + { + "Parameter": "rank", + "Type": "int32", + "Description": "Rank in leaderboard" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardFixedResolutionRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardFixedResolutionRequest.json new file mode 100644 index 00000000..682a8590 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardFixedResolutionRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "resolution", + "Type": "string", + "Description": "Leaderboard resolution. Possible resolutions are 1D,1W,1M,6M,ALL", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Number of leaderboard entries to return", + "Required": "Yes" + }, + { + "Parameter": "account", + "Type": "string", + "Description": "Account address that's querying the leaderboard", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardFixedResolutionResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardFixedResolutionResponse.json new file mode 100644 index 00000000..76731191 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardFixedResolutionResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "first_date", + "Type": "string", + "Description": "First date of snapshots used for the leaderboard period" + }, + { + "Parameter": "last_date", + "Type": "string", + "Description": "Last date of snapshots used for the leaderboard period" + }, + { + "Parameter": "leaders", + "Type": "LeaderboardRow array", + "Description": "Leaderboard entries" + }, + { + "Parameter": "account_row", + "Type": "LeaderboardRow", + "Description": "Leaderboard entry for the querying account" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardRequest.json new file mode 100644 index 00000000..dbe959c9 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "start_date", + "Type": "int64", + "Description": "Start date of the leaderboard period in unix time (ms)", + "Required": "Yes" + }, + { + "Parameter": "end_date", + "Type": "int64", + "Description": "End date of the leaderboard period in unix time (ms)", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Number of leaderboard entries to return", + "Required": "Yes" + }, + { + "Parameter": "account", + "Type": "string", + "Description": "Account address that's querying the leaderboard", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardResponse.json new file mode 100644 index 00000000..76731191 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/PnlLeaderboardResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "first_date", + "Type": "string", + "Description": "First date of snapshots used for the leaderboard period" + }, + { + "Parameter": "last_date", + "Type": "string", + "Description": "Last date of snapshots used for the leaderboard period" + }, + { + "Parameter": "leaders", + "Type": "LeaderboardRow array", + "Description": "Leaderboard entries" + }, + { + "Parameter": "account_row", + "Type": "LeaderboardRow", + "Description": "Leaderboard entry for the querying account" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/PriceLevel.json b/source/json_tables/indexer_new/injective_archiver_rpc/PriceLevel.json new file mode 100644 index 00000000..d7ecf738 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/PriceLevel.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "Price number of the price level." + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the price level." + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Price level last updated timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/RpnlRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/RpnlRequest.json new file mode 100644 index 00000000..5c812694 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/RpnlRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Symbol resolution. Possible resolutions are 1D,1W,1M", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/RpnlResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/RpnlResponse.json new file mode 100644 index 00000000..ba90498e --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/RpnlResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "historical_rpnl", + "Type": "HistoricalRPNL", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardFixedResolutionRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardFixedResolutionRequest.json new file mode 100644 index 00000000..682a8590 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardFixedResolutionRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "resolution", + "Type": "string", + "Description": "Leaderboard resolution. Possible resolutions are 1D,1W,1M,6M,ALL", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Number of leaderboard entries to return", + "Required": "Yes" + }, + { + "Parameter": "account", + "Type": "string", + "Description": "Account address that's querying the leaderboard", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardFixedResolutionResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardFixedResolutionResponse.json new file mode 100644 index 00000000..76731191 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardFixedResolutionResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "first_date", + "Type": "string", + "Description": "First date of snapshots used for the leaderboard period" + }, + { + "Parameter": "last_date", + "Type": "string", + "Description": "Last date of snapshots used for the leaderboard period" + }, + { + "Parameter": "leaders", + "Type": "LeaderboardRow array", + "Description": "Leaderboard entries" + }, + { + "Parameter": "account_row", + "Type": "LeaderboardRow", + "Description": "Leaderboard entry for the querying account" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardRequest.json new file mode 100644 index 00000000..dbe959c9 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "start_date", + "Type": "int64", + "Description": "Start date of the leaderboard period in unix time (ms)", + "Required": "Yes" + }, + { + "Parameter": "end_date", + "Type": "int64", + "Description": "End date of the leaderboard period in unix time (ms)", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Number of leaderboard entries to return", + "Required": "Yes" + }, + { + "Parameter": "account", + "Type": "string", + "Description": "Account address that's querying the leaderboard", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardResponse.json new file mode 100644 index 00000000..76731191 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/VolLeaderboardResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "first_date", + "Type": "string", + "Description": "First date of snapshots used for the leaderboard period" + }, + { + "Parameter": "last_date", + "Type": "string", + "Description": "Last date of snapshots used for the leaderboard period" + }, + { + "Parameter": "leaders", + "Type": "LeaderboardRow array", + "Description": "Leaderboard entries" + }, + { + "Parameter": "account_row", + "Type": "LeaderboardRow", + "Description": "Leaderboard entry for the querying account" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/VolumesRequest.json b/source/json_tables/indexer_new/injective_archiver_rpc/VolumesRequest.json new file mode 100644 index 00000000..5c812694 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/VolumesRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Symbol resolution. Possible resolutions are 1D,1W,1M", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_archiver_rpc/VolumesResponse.json b/source/json_tables/indexer_new/injective_archiver_rpc/VolumesResponse.json new file mode 100644 index 00000000..962cdbf2 --- /dev/null +++ b/source/json_tables/indexer_new/injective_archiver_rpc/VolumesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "historical_volumes", + "Type": "HistoricalVolumes", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_auction_rpc/Auction.json b/source/json_tables/indexer_new/injective_auction_rpc/Auction.json new file mode 100644 index 00000000..00341e99 --- /dev/null +++ b/source/json_tables/indexer_new/injective_auction_rpc/Auction.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "winner", + "Type": "string", + "Description": "Account address of the auction winner" + }, + { + "Parameter": "basket", + "Type": "Coin array", + "Description": "Coins in the basket" + }, + { + "Parameter": "winning_bid_amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "round", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "end_timestamp", + "Type": "int64", + "Description": "Auction end timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "UpdatedAt timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_auction_rpc/AuctionEndpointRequest.json b/source/json_tables/indexer_new/injective_auction_rpc/AuctionEndpointRequest.json new file mode 100644 index 00000000..716ca592 --- /dev/null +++ b/source/json_tables/indexer_new/injective_auction_rpc/AuctionEndpointRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "round", + "Type": "int64", + "Description": "The auction round number. -1 for latest.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_auction_rpc/AuctionEndpointResponse.json b/source/json_tables/indexer_new/injective_auction_rpc/AuctionEndpointResponse.json new file mode 100644 index 00000000..e46fcfef --- /dev/null +++ b/source/json_tables/indexer_new/injective_auction_rpc/AuctionEndpointResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "auction", + "Type": "Auction", + "Description": "The auction" + }, + { + "Parameter": "bids", + "Type": "Bid array", + "Description": "Bids of the auction" + } +] diff --git a/source/json_tables/indexer_new/injective_auction_rpc/AuctionsResponse.json b/source/json_tables/indexer_new/injective_auction_rpc/AuctionsResponse.json new file mode 100644 index 00000000..d9c48e0b --- /dev/null +++ b/source/json_tables/indexer_new/injective_auction_rpc/AuctionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "auctions", + "Type": "Auction array", + "Description": "The historical auctions" + } +] diff --git a/source/json_tables/indexer_new/injective_auction_rpc/Bid.json b/source/json_tables/indexer_new/injective_auction_rpc/Bid.json new file mode 100644 index 00000000..0bbb5882 --- /dev/null +++ b/source/json_tables/indexer_new/injective_auction_rpc/Bid.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "bidder", + "Type": "string", + "Description": "Account address of the bidder" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Bid timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_auction_rpc/Coin.json b/source/json_tables/indexer_new/injective_auction_rpc/Coin.json new file mode 100644 index 00000000..8fa4b17b --- /dev/null +++ b/source/json_tables/indexer_new/injective_auction_rpc/Coin.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of the coin" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "usd_value", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_auction_rpc/InjBurntEndpointResponse.json b/source/json_tables/indexer_new/injective_auction_rpc/InjBurntEndpointResponse.json new file mode 100644 index 00000000..2dba003b --- /dev/null +++ b/source/json_tables/indexer_new/injective_auction_rpc/InjBurntEndpointResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "total_inj_burnt", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_auction_rpc/StreamBidsResponse.json b/source/json_tables/indexer_new/injective_auction_rpc/StreamBidsResponse.json new file mode 100644 index 00000000..56820bb6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_auction_rpc/StreamBidsResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "bidder", + "Type": "string", + "Description": "Account address of the bidder" + }, + { + "Parameter": "bid_amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "round", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/Campaign.json b/source/json_tables/indexer_new/injective_campaign_rpc/Campaign.json new file mode 100644 index 00000000..2d91f0f9 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/Campaign.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "campaign_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the trading strategy" + }, + { + "Parameter": "total_score", + "Type": "string", + "Description": "Total campaign score" + }, + { + "Parameter": "last_updated", + "Type": "int64", + "Description": "Last time the campaign score has been updated." + }, + { + "Parameter": "start_date", + "Type": "int64", + "Description": "Campaign start date in UNIX millis." + }, + { + "Parameter": "end_date", + "Type": "int64", + "Description": "Campaign end date in UNIX millis." + }, + { + "Parameter": "is_claimable", + "Type": "bool", + "Description": "Whether the campaign rewards can be claimed." + }, + { + "Parameter": "round_id", + "Type": "int32", + "Description": "Campaigns round ID" + }, + { + "Parameter": "manager_contract", + "Type": "string", + "Description": "Contract address that controls this campaign" + }, + { + "Parameter": "rewards", + "Type": "Coin array", + "Description": "Reward tokens of this campaign" + }, + { + "Parameter": "user_score", + "Type": "string", + "Description": "Total user score if accountAddress is passed, this is useful to estimate account's reward" + }, + { + "Parameter": "user_claimed", + "Type": "bool", + "Description": "Return true if user claimed the reward of this campaign" + }, + { + "Parameter": "subaccount_id_suffix", + "Type": "string", + "Description": "Suffix of the subaccount that eligible for volume score" + }, + { + "Parameter": "reward_contract", + "Type": "string", + "Description": "Contract that manage users reward" + }, + { + "Parameter": "version", + "Type": "string", + "Description": "Version of reward contract, UI use this to determine the message that need to be sent" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "Campaign type" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/CampaignSummary.json b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignSummary.json new file mode 100644 index 00000000..0a5a953b --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignSummary.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "campaign_id", + "Type": "string", + "Description": "Campaign id" + }, + { + "Parameter": "campaign_contract", + "Type": "string", + "Description": "Guild manager contract address" + }, + { + "Parameter": "total_guilds_count", + "Type": "int32", + "Description": "Number of guild in the campaign" + }, + { + "Parameter": "total_tvl", + "Type": "string", + "Description": "Total TVL" + }, + { + "Parameter": "total_average_tvl", + "Type": "string", + "Description": "Sum average TVL of all guilds" + }, + { + "Parameter": "total_volume", + "Type": "string", + "Description": "Total volume across all guilds (in market quote denom, often USDT)" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Snapshot updated at time in UNIX milli" + }, + { + "Parameter": "total_members_count", + "Type": "int32", + "Description": "Total member joined the campaign (include guild masters)" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "Campaign start time" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "Campaign end time" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/CampaignUser.json b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignUser.json new file mode 100644 index 00000000..f414d2ea --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignUser.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "campaign_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the trading strategy" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address" + }, + { + "Parameter": "score", + "Type": "string", + "Description": "Campaign score" + }, + { + "Parameter": "contract_updated", + "Type": "bool", + "Description": "Whether the distribution contract has been updated with the latest score" + }, + { + "Parameter": "block_height", + "Type": "int64", + "Description": "Block height when the score has been updated." + }, + { + "Parameter": "block_time", + "Type": "int64", + "Description": "Block time timestamp in UNIX millis." + }, + { + "Parameter": "purchased_amount", + "Type": "string", + "Description": "Amount swapped but only count base denom of the market" + }, + { + "Parameter": "galxe_updated", + "Type": "bool", + "Description": "True if this user is updated to be in Galxe Campain list, only eligible address are added" + }, + { + "Parameter": "reward_claimed", + "Type": "bool", + "Description": "True if this user claimed the reward" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/CampaignV2.json b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignV2.json new file mode 100644 index 00000000..9ebdd382 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignV2.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "campaign_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the trading strategy" + }, + { + "Parameter": "total_score", + "Type": "string", + "Description": "Total campaign score" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Campaign creation date in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Campaign last update date in UNIX millis." + }, + { + "Parameter": "start_date", + "Type": "int64", + "Description": "Campaign start date in UNIX millis." + }, + { + "Parameter": "end_date", + "Type": "int64", + "Description": "Campaign end date in UNIX millis." + }, + { + "Parameter": "is_claimable", + "Type": "bool", + "Description": "Whether the campaign rewards can be claimed." + }, + { + "Parameter": "round_id", + "Type": "int32", + "Description": "Campaigns round ID" + }, + { + "Parameter": "manager_contract", + "Type": "string", + "Description": "Contract address that controls this campaign" + }, + { + "Parameter": "rewards", + "Type": "Coin array", + "Description": "Reward tokens of this campaign" + }, + { + "Parameter": "subaccount_id_suffix", + "Type": "string", + "Description": "Suffix of the subaccount that eligible for volume score" + }, + { + "Parameter": "reward_contract", + "Type": "string", + "Description": "Contract that manage users reward" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "Campaign type" + }, + { + "Parameter": "version", + "Type": "string", + "Description": "Version of reward contract, UI use this to determine the message that need to be sent" + }, + { + "Parameter": "name", + "Type": "string", + "Description": "Campaign name" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "Campaign description" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsRequest.json b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsRequest.json new file mode 100644 index 00000000..e4b8c843 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "round_id", + "Type": "int64", + "Description": "Round ID, if not specified, it will return latest roundId", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Address of login account, if not specified it will return no user rewards", + "Required": "Yes" + }, + { + "Parameter": "to_round_id", + "Type": "int32", + "Description": "This will return campaign x where x.roundId <= toRoundId. Useful for listing multiple rounds", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Contract address that manages the round and reward", + "Required": "Yes" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "Campaign type", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsResponse.json b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsResponse.json new file mode 100644 index 00000000..c15242ea --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "campaigns", + "Type": "Campaign array", + "Description": "" + }, + { + "Parameter": "accumulated_rewards", + "Type": "Coin array", + "Description": "" + }, + { + "Parameter": "reward_count", + "Type": "int32", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsV2Request.json b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsV2Request.json new file mode 100644 index 00000000..5a637c5c --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsV2Request.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "type", + "Type": "string", + "Description": "Campaign type", + "Required": "Yes" + }, + { + "Parameter": "active", + "Type": "bool", + "Description": "Whether the campaign is active. Deprecated: use status instead.", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit number of returned campaigns", + "Required": "Yes" + }, + { + "Parameter": "cursor", + "Type": "string", + "Description": "Cursor for pagination", + "Required": "Yes" + }, + { + "Parameter": "from_start_date", + "Type": "int64", + "Description": "Filter campaigns by start date greater than this value in milliseconds", + "Required": "Yes" + }, + { + "Parameter": "to_start_date", + "Type": "int64", + "Description": "Filter campaigns by start date lower than this value in milliseconds", + "Required": "Yes" + }, + { + "Parameter": "from_end_date", + "Type": "int64", + "Description": "Filter campaigns by end date greater than this value in milliseconds", + "Required": "Yes" + }, + { + "Parameter": "to_end_date", + "Type": "int64", + "Description": "Filter campaigns by end date lower than this value in milliseconds", + "Required": "Yes" + }, + { + "Parameter": "status", + "Type": "string", + "Description": "Filter campaigns by status", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsV2Response.json b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsV2Response.json new file mode 100644 index 00000000..c43cd9d6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/CampaignsV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "campaigns", + "Type": "CampaignV2 array", + "Description": "" + }, + { + "Parameter": "cursor", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/Coin.json b/source/json_tables/indexer_new/injective_campaign_rpc/Coin.json new file mode 100644 index 00000000..8fa4b17b --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/Coin.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of the coin" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "usd_value", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/GetGuildMemberRequest.json b/source/json_tables/indexer_new/injective_campaign_rpc/GetGuildMemberRequest.json new file mode 100644 index 00000000..8340e6b7 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/GetGuildMemberRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "campaign_contract", + "Type": "string", + "Description": "Campaign contract address", + "Required": "Yes" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "User address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/GetGuildMemberResponse.json b/source/json_tables/indexer_new/injective_campaign_rpc/GetGuildMemberResponse.json new file mode 100644 index 00000000..01136d47 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/GetGuildMemberResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "info", + "Type": "GuildMember", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/Guild.json b/source/json_tables/indexer_new/injective_campaign_rpc/Guild.json new file mode 100644 index 00000000..e7698695 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/Guild.json @@ -0,0 +1,77 @@ +[ + { + "Parameter": "campaign_contract", + "Type": "string", + "Description": "" + }, + { + "Parameter": "guild_id", + "Type": "string", + "Description": "Guild ID" + }, + { + "Parameter": "master_address", + "Type": "string", + "Description": "Guild's master address" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Guild creation date (in UNIX milliseconds)" + }, + { + "Parameter": "tvl_score", + "Type": "string", + "Description": "Average TVL score" + }, + { + "Parameter": "volume_score", + "Type": "string", + "Description": "Total volume score" + }, + { + "Parameter": "rank_by_volume", + "Type": "int32", + "Description": "guild's rank by volume" + }, + { + "Parameter": "rank_by_tvl", + "Type": "int32", + "Description": "guild's rank by TVL" + }, + { + "Parameter": "logo", + "Type": "string", + "Description": "guild's logo, at the moment it supports numberic string (i.e '1', '2' and so on) not a random URL because of front end limitation" + }, + { + "Parameter": "total_tvl", + "Type": "string", + "Description": "guild's total TVL" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Snapshot updated at time in UNIX milli" + }, + { + "Parameter": "name", + "Type": "string", + "Description": "Guild name" + }, + { + "Parameter": "is_active", + "Type": "bool", + "Description": "Active status of guild, true when master total tvl meets the minimum requirements" + }, + { + "Parameter": "master_balance", + "Type": "string", + "Description": "Master balance (in current campaigns denom)" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "Guild description, set by master of the guild" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/GuildMember.json b/source/json_tables/indexer_new/injective_campaign_rpc/GuildMember.json new file mode 100644 index 00000000..4148c6ea --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/GuildMember.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "campaign_contract", + "Type": "string", + "Description": "Guild manager contract address" + }, + { + "Parameter": "guild_id", + "Type": "string", + "Description": "Guild ID" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "Guild member address" + }, + { + "Parameter": "joined_at", + "Type": "int64", + "Description": "Guild enrollment date (in UNIX milliseconds)" + }, + { + "Parameter": "tvl_score", + "Type": "string", + "Description": "Average TVL score" + }, + { + "Parameter": "volume_score", + "Type": "string", + "Description": "Total volume score" + }, + { + "Parameter": "total_tvl", + "Type": "string", + "Description": "Total volume score" + }, + { + "Parameter": "volume_score_percentage", + "Type": "float64", + "Description": "Volume percentage out of guilds total volume" + }, + { + "Parameter": "tvl_score_percentage", + "Type": "float64", + "Description": "TVL percentage out of guilds total TVL score" + }, + { + "Parameter": "tvl_reward", + "Type": "Coin array", + "Description": "Rewards for volume campaign (amount+denom)" + }, + { + "Parameter": "volume_reward", + "Type": "Coin array", + "Description": "Rewards for TVL campaign (amount+denom)" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildMembersRequest.json b/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildMembersRequest.json new file mode 100644 index 00000000..1d40b9e8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildMembersRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "campaign_contract", + "Type": "string", + "Description": "Campaign contract address", + "Required": "Yes" + }, + { + "Parameter": "guild_id", + "Type": "string", + "Description": "ID of guild, inside campaign", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit number of returned guild members", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "int32", + "Description": "Skip some first guild members in the list for next page", + "Required": "Yes" + }, + { + "Parameter": "include_guild_info", + "Type": "bool", + "Description": "whether to include guild summary info, it's better to use this in terms of latency, instead of sending 2 requests we just need once", + "Required": "Yes" + }, + { + "Parameter": "sort_by", + "Type": "string", + "Description": "Sort by some metrics", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildMembersResponse.json b/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildMembersResponse.json new file mode 100644 index 00000000..40842668 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildMembersResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "members", + "Type": "GuildMember array", + "Description": "" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "guild_info", + "Type": "Guild", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildsRequest.json b/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildsRequest.json new file mode 100644 index 00000000..11ee3b71 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "campaign_contract", + "Type": "string", + "Description": "Campaign contract address", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit number of returned guilds", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "int32", + "Description": "Skip some first guilds in the list for next page", + "Required": "Yes" + }, + { + "Parameter": "sort_by", + "Type": "string", + "Description": "Sort by some metrics", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildsResponse.json b/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildsResponse.json new file mode 100644 index 00000000..142a6c42 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/ListGuildsResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "guilds", + "Type": "Guild array", + "Description": "" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Snapshot updated at time in UNIX milli" + }, + { + "Parameter": "campaign_summary", + "Type": "CampaignSummary", + "Description": "Summary of the campaign" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/Paging.json b/source/json_tables/indexer_new/injective_campaign_rpc/Paging.json new file mode 100644 index 00000000..d11d26dc --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/Paging.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "total", + "Type": "int64", + "Description": "total number of txs saved in database" + }, + { + "Parameter": "from", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "to", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "count_by_subaccount", + "Type": "int64", + "Description": "count entries by subaccount, serving some places on helix" + }, + { + "Parameter": "next", + "Type": "string array", + "Description": "array of tokens to navigate to the next pages" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/RankingRequest.json b/source/json_tables/indexer_new/injective_campaign_rpc/RankingRequest.json new file mode 100644 index 00000000..7159ebb2 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/RankingRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "campaign_id", + "Type": "string", + "Description": "Campaign ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the campaign", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Contract address that manages the round and reward", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_campaign_rpc/RankingResponse.json b/source/json_tables/indexer_new/injective_campaign_rpc/RankingResponse.json new file mode 100644 index 00000000..9a001307 --- /dev/null +++ b/source/json_tables/indexer_new/injective_campaign_rpc/RankingResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "campaign", + "Type": "Campaign", + "Description": "The campaign information" + }, + { + "Parameter": "users", + "Type": "CampaignUser array", + "Description": "The campaign users" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/AllDerivativeMarketSummaryRequest.json b/source/json_tables/indexer_new/injective_chart_rpc/AllDerivativeMarketSummaryRequest.json new file mode 100644 index 00000000..0694f003 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/AllDerivativeMarketSummaryRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "resolution", + "Type": "string", + "Description": "Specify the resolution", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/AllDerivativeMarketSummaryResponse.json b/source/json_tables/indexer_new/injective_chart_rpc/AllDerivativeMarketSummaryResponse.json new file mode 100644 index 00000000..b49e4026 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/AllDerivativeMarketSummaryResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "field", + "Type": "MarketSummaryResp array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/AllSpotMarketSummaryRequest.json b/source/json_tables/indexer_new/injective_chart_rpc/AllSpotMarketSummaryRequest.json new file mode 100644 index 00000000..0694f003 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/AllSpotMarketSummaryRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "resolution", + "Type": "string", + "Description": "Specify the resolution", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/AllSpotMarketSummaryResponse.json b/source/json_tables/indexer_new/injective_chart_rpc/AllSpotMarketSummaryResponse.json new file mode 100644 index 00000000..b49e4026 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/AllSpotMarketSummaryResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "field", + "Type": "MarketSummaryResp array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketHistoryRequest.json b/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketHistoryRequest.json new file mode 100644 index 00000000..fc639765 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketHistoryRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "Specify unique ticker to search.", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "As an alternative is possible to provide a marketId", + "Required": "Yes" + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Symbol resolution. Possible resolutions are daily (D or 1D, 2D ... ), weekly (1W, 2W ...), monthly (1M, 2M...) and an intra-day resolution – minutes(1, 2 ...).", + "Required": "Yes" + }, + { + "Parameter": "from", + "Type": "int32", + "Description": "Unix timestamp (UTC) of the leftmost required bar, including from", + "Required": "Yes" + }, + { + "Parameter": "to", + "Type": "int32", + "Description": "Unix timestamp (UTC) of the rightmost required bar, including to. It can be in the future. In this case, the rightmost required bar is the latest available bar.", + "Required": "Yes" + }, + { + "Parameter": "countback", + "Type": "int32", + "Description": "Number of bars (higher priority than from) starting with to. If countback is set, from should be ignored.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketHistoryResponse.json b/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketHistoryResponse.json new file mode 100644 index 00000000..31b26b3e --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketHistoryResponse.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "t", + "Type": "int32 array", + "Description": "Bar time, Unix timestamp (UTC). Daily bars should only have the date part, time should be 0." + }, + { + "Parameter": "o", + "Type": "float64 array", + "Description": "Open price." + }, + { + "Parameter": "h", + "Type": "float64 array", + "Description": "High price." + }, + { + "Parameter": "l", + "Type": "float64 array", + "Description": "Low price." + }, + { + "Parameter": "c", + "Type": "float64 array", + "Description": "Close price." + }, + { + "Parameter": "v", + "Type": "float64 array", + "Description": "Volume." + }, + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the request." + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketSummaryRequest.json b/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketSummaryRequest.json new file mode 100644 index 00000000..ea37c540 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketSummaryRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID of the derivative market", + "Required": "Yes" + }, + { + "Parameter": "index_price", + "Type": "bool", + "Description": "Request the summary of index price feed", + "Required": "Yes" + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Specify the resolution", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketSummaryResponse.json b/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketSummaryResponse.json new file mode 100644 index 00000000..bf64852e --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/DerivativeMarketSummaryResponse.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID of the derivativeMarket market" + }, + { + "Parameter": "open", + "Type": "float64", + "Description": "Open price." + }, + { + "Parameter": "high", + "Type": "float64", + "Description": "High price." + }, + { + "Parameter": "low", + "Type": "float64", + "Description": "Low price." + }, + { + "Parameter": "volume", + "Type": "float64", + "Description": "Volume." + }, + { + "Parameter": "price", + "Type": "float64", + "Description": "Current price based on latest fill event." + }, + { + "Parameter": "change", + "Type": "float64", + "Description": "Change percent from opening price." + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotHistoryResponse.json b/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotHistoryResponse.json new file mode 100644 index 00000000..9e091fb1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotHistoryResponse.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market identifier." + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Symbol resolution" + }, + { + "Parameter": "t", + "Type": "int32 array", + "Description": "Bar time, Unix timestamp (UTC). Daily bars should only have the date part, time should be 0." + }, + { + "Parameter": "o", + "Type": "float64 array", + "Description": "Open price." + }, + { + "Parameter": "h", + "Type": "float64 array", + "Description": "High price." + }, + { + "Parameter": "l", + "Type": "float64 array", + "Description": "Low price." + }, + { + "Parameter": "c", + "Type": "float64 array", + "Description": "Close price." + }, + { + "Parameter": "v", + "Type": "float64 array", + "Description": "Volume." + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotRequest.json b/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotRequest.json new file mode 100644 index 00000000..a782671f --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_i_ds", + "Type": "string array", + "Description": "Specify multiple marketIDs to search.", + "Required": "Yes" + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Symbols resolution(minutes). Default is 1", + "Required": "Yes" + }, + { + "Parameter": "countback", + "Type": "int32", + "Description": "Number of bars returned, starting from the recent ones.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotResponse.json b/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotResponse.json new file mode 100644 index 00000000..58b144c9 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/MarketSnapshotResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "field", + "Type": "MarketSnapshotHistoryResponse array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/MarketSummaryResp.json b/source/json_tables/indexer_new/injective_chart_rpc/MarketSummaryResp.json new file mode 100644 index 00000000..bf64852e --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/MarketSummaryResp.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID of the derivativeMarket market" + }, + { + "Parameter": "open", + "Type": "float64", + "Description": "Open price." + }, + { + "Parameter": "high", + "Type": "float64", + "Description": "High price." + }, + { + "Parameter": "low", + "Type": "float64", + "Description": "Low price." + }, + { + "Parameter": "volume", + "Type": "float64", + "Description": "Volume." + }, + { + "Parameter": "price", + "Type": "float64", + "Description": "Current price based on latest fill event." + }, + { + "Parameter": "change", + "Type": "float64", + "Description": "Change percent from opening price." + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketHistoryRequest.json b/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketHistoryRequest.json new file mode 100644 index 00000000..886e3099 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketHistoryRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "Specify unique ticker to search", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "As an alternative is possible to provide a marketId", + "Required": "Yes" + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Symbol resolution. Possible resolutions are daily (D or 1D, 2D ... ), weekly (1W, 2W ...), monthly (1M, 2M...) and an intra-day resolution – minutes(1, 2 ...).", + "Required": "Yes" + }, + { + "Parameter": "from", + "Type": "int32", + "Description": "Unix timestamp (UTC) of the leftmost required bar, including from", + "Required": "Yes" + }, + { + "Parameter": "to", + "Type": "int32", + "Description": "Unix timestamp (UTC) of the rightmost required bar, including to. It can be in the future. In this case, the rightmost required bar is the latest available bar.", + "Required": "Yes" + }, + { + "Parameter": "countback", + "Type": "int32", + "Description": "Number of bars (higher priority than from) starting with to. If countback is set, from should be ignored.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketHistoryResponse.json b/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketHistoryResponse.json new file mode 100644 index 00000000..31b26b3e --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketHistoryResponse.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "t", + "Type": "int32 array", + "Description": "Bar time, Unix timestamp (UTC). Daily bars should only have the date part, time should be 0." + }, + { + "Parameter": "o", + "Type": "float64 array", + "Description": "Open price." + }, + { + "Parameter": "h", + "Type": "float64 array", + "Description": "High price." + }, + { + "Parameter": "l", + "Type": "float64 array", + "Description": "Low price." + }, + { + "Parameter": "c", + "Type": "float64 array", + "Description": "Close price." + }, + { + "Parameter": "v", + "Type": "float64 array", + "Description": "Volume." + }, + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the request." + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketSummaryRequest.json b/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketSummaryRequest.json new file mode 100644 index 00000000..36154460 --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketSummaryRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID of the spot market", + "Required": "Yes" + }, + { + "Parameter": "resolution", + "Type": "string", + "Description": "Specify the resolution", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketSummaryResponse.json b/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketSummaryResponse.json new file mode 100644 index 00000000..bf64852e --- /dev/null +++ b/source/json_tables/indexer_new/injective_chart_rpc/SpotMarketSummaryResponse.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID of the derivativeMarket market" + }, + { + "Parameter": "open", + "Type": "float64", + "Description": "Open price." + }, + { + "Parameter": "high", + "Type": "float64", + "Description": "High price." + }, + { + "Parameter": "low", + "Type": "float64", + "Description": "Low price." + }, + { + "Parameter": "volume", + "Type": "float64", + "Description": "Volume." + }, + { + "Parameter": "price", + "Type": "float64", + "Description": "Current price based on latest fill event." + }, + { + "Parameter": "change", + "Type": "float64", + "Description": "Change percent from opening price." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketInfo.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketInfo.json new file mode 100644 index 00000000..d1000c7f --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketInfo.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Binary Options Market ID is crypto.Keccak256Hash([]byte((oracleType.String() + ticker + quoteDenom + oracleSymbol + oracleProvider)))" + }, + { + "Parameter": "market_status", + "Type": "string", + "Description": "The status of the market" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "A name of the binary options market." + }, + { + "Parameter": "oracle_symbol", + "Type": "string", + "Description": "Oracle symbol" + }, + { + "Parameter": "oracle_provider", + "Type": "string", + "Description": "Oracle provider" + }, + { + "Parameter": "oracle_type", + "Type": "string", + "Description": "Oracle Type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "OracleScaleFactor" + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "Defines the expiration time for the market in UNIX seconds." + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "Defines the settlement time for the market in UNIX seconds." + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Coin denom used for the quote asset." + }, + { + "Parameter": "quote_token_meta", + "Type": "TokenMeta", + "Description": "Token metadata for quote asset" + }, + { + "Parameter": "maker_fee_rate", + "Type": "string", + "Description": "Defines the fee percentage makers pay when trading (in quote asset)" + }, + { + "Parameter": "taker_fee_rate", + "Type": "string", + "Description": "Defines the fee percentage takers pay when trading (in quote asset)" + }, + { + "Parameter": "service_provider_fee", + "Type": "string", + "Description": "Percentage of the transaction fee shared with the service provider" + }, + { + "Parameter": "min_price_tick_size", + "Type": "string", + "Description": "Defines the minimum required tick size for the order's price" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "string", + "Description": "Defines the minimum required tick size for the order's quantity" + }, + { + "Parameter": "settlement_price", + "Type": "string", + "Description": "Defines the settlement price of the market" + }, + { + "Parameter": "min_notional", + "Type": "string", + "Description": "Defines the minimum notional value for the market" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketRequest.json new file mode 100644 index 00000000..3d8c5562 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market we want to fetch", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketResponse.json new file mode 100644 index 00000000..9bb771a5 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "BinaryOptionsMarketInfo", + "Description": "Info about particular derivative market" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketsRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketsRequest.json new file mode 100644 index 00000000..fc51ece5 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "market_status", + "Type": "string", + "Description": "Filter by market status", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Filter by the Coin denomination of the quote currency", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketsResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketsResponse.json new file mode 100644 index 00000000..5649825f --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/BinaryOptionsMarketsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "markets", + "Type": "BinaryOptionsMarketInfo array", + "Description": "Binary Options Markets list" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeLimitOrder.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeLimitOrder.json new file mode 100644 index 00000000..b826fa10 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeLimitOrder.json @@ -0,0 +1,112 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "is_reduce_only", + "Type": "bool", + "Description": "True if the order is a reduce-only order" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Margin of the order" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Price of the order" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the order" + }, + { + "Parameter": "unfilled_quantity", + "Type": "string", + "Description": "The amount of the quantity remaining unfilled" + }, + { + "Parameter": "trigger_price", + "Type": "string", + "Description": "Trigger price is the trigger price used by stop/take orders" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Order state" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "order_number", + "Type": "int64", + "Description": "Order number of subaccount" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "Order type" + }, + { + "Parameter": "is_conditional", + "Type": "bool", + "Description": "Order type" + }, + { + "Parameter": "trigger_at", + "Type": "uint64", + "Description": "Trigger timestamp, only exists for conditional orders" + }, + { + "Parameter": "placed_order_hash", + "Type": "string", + "Description": "OrderHash of order that is triggered by this conditional order" + }, + { + "Parameter": "execution_type", + "Type": "string", + "Description": "Execution type of conditional order" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction Hash where order is created. Not all orders have this field" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeLimitOrderbookV2.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeLimitOrderbookV2.json new file mode 100644 index 00000000..2a3224bc --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeLimitOrderbookV2.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "buys", + "Type": "PriceLevel array", + "Description": "Array of price levels for buys" + }, + { + "Parameter": "sells", + "Type": "PriceLevel array", + "Description": "Array of price levels for sells" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "market orderbook sequence" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Last update timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeMarketInfo.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeMarketInfo.json new file mode 100644 index 00000000..9390969d --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeMarketInfo.json @@ -0,0 +1,112 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "DerivativeMarket ID is crypto.Keccak256Hash([]byte((oracleType.String() + ticker + quoteDenom + oracleBase + oracleQuote))) for perpetual markets and crypto.Keccak256Hash([]byte((oracleType.String() + ticker + quoteDenom + oracleBase + oracleQuote + strconv.Itoa(int(expiry))))) for expiry futures markets" + }, + { + "Parameter": "market_status", + "Type": "string", + "Description": "The status of the market" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote asset." + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_type", + "Type": "string", + "Description": "Oracle Type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "OracleScaleFactor" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "string", + "Description": "Defines the initial margin ratio of a derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "string", + "Description": "Defines the maintenance margin ratio of a derivative market" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Coin denom used for the quote asset." + }, + { + "Parameter": "quote_token_meta", + "Type": "TokenMeta", + "Description": "Token metadata for quote asset" + }, + { + "Parameter": "maker_fee_rate", + "Type": "string", + "Description": "Defines the fee percentage makers pay when trading (in quote asset)" + }, + { + "Parameter": "taker_fee_rate", + "Type": "string", + "Description": "Defines the fee percentage takers pay when trading (in quote asset)" + }, + { + "Parameter": "service_provider_fee", + "Type": "string", + "Description": "Percentage of the transaction fee shared with the service provider" + }, + { + "Parameter": "is_perpetual", + "Type": "bool", + "Description": "True if the market is a perpetual swap market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "string", + "Description": "Defines the minimum required tick size for the order's price" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "string", + "Description": "Defines the minimum required tick size for the order's quantity" + }, + { + "Parameter": "perpetual_market_info", + "Type": "PerpetualMarketInfo", + "Description": "" + }, + { + "Parameter": "perpetual_market_funding", + "Type": "PerpetualMarketFunding", + "Description": "" + }, + { + "Parameter": "expiry_futures_market_info", + "Type": "ExpiryFuturesMarketInfo", + "Description": "" + }, + { + "Parameter": "min_notional", + "Type": "string", + "Description": "Minimum notional value for the order" + }, + { + "Parameter": "reduce_margin_ratio", + "Type": "string", + "Description": "Defines the reduce margin ratio of a derivative market" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeOrderHistory.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeOrderHistory.json new file mode 100644 index 00000000..7a41d158 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeOrderHistory.json @@ -0,0 +1,107 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Spot Market ID is keccak265(baseDenom + quoteDenom)" + }, + { + "Parameter": "is_active", + "Type": "bool", + "Description": "active state of the order" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "execution_type", + "Type": "string", + "Description": "The execution type" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Price of the order" + }, + { + "Parameter": "trigger_price", + "Type": "string", + "Description": "Trigger price" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the order" + }, + { + "Parameter": "filled_quantity", + "Type": "string", + "Description": "Filled amount" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Order state" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "is_reduce_only", + "Type": "bool", + "Description": "True if an order is reduce only" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Order direction (order side)" + }, + { + "Parameter": "is_conditional", + "Type": "bool", + "Description": "True if this is conditional order, otherwise false" + }, + { + "Parameter": "trigger_at", + "Type": "uint64", + "Description": "Trigger timestamp in unix milli" + }, + { + "Parameter": "placed_order_hash", + "Type": "string", + "Description": "Order hash placed when this triggers" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Order's margin" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction Hash where order is created. Not all orders have this field" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativePosition.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativePosition.json new file mode 100644 index 00000000..d77bf07b --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativePosition.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker of the derivative market" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that the position belongs to" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Direction of the position" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the position" + }, + { + "Parameter": "entry_price", + "Type": "string", + "Description": "Price of the position" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Margin of the position" + }, + { + "Parameter": "liquidation_price", + "Type": "string", + "Description": "LiquidationPrice of the position" + }, + { + "Parameter": "mark_price", + "Type": "string", + "Description": "MarkPrice of the position" + }, + { + "Parameter": "aggregate_reduce_only_quantity", + "Type": "string", + "Description": "Aggregate Quantity of the Reduce Only orders associated with the position" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Position updated timestamp in UNIX millis." + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Position created timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativePositionV2.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativePositionV2.json new file mode 100644 index 00000000..5c6ff18e --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativePositionV2.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker of the derivative market" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that the position belongs to" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Direction of the position" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the position" + }, + { + "Parameter": "entry_price", + "Type": "string", + "Description": "Price of the position" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Margin of the position" + }, + { + "Parameter": "liquidation_price", + "Type": "string", + "Description": "LiquidationPrice of the position" + }, + { + "Parameter": "mark_price", + "Type": "string", + "Description": "MarkPrice of the position" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Position updated timestamp in UNIX millis." + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "Market quote denom" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeTrade.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeTrade.json new file mode 100644 index 00000000..1a57d909 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/DerivativeTrade.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Order hash." + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that executed the trade" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "The ID of the market that this trade is in" + }, + { + "Parameter": "trade_execution_type", + "Type": "string", + "Description": "The execution type of the trade" + }, + { + "Parameter": "is_liquidation", + "Type": "bool", + "Description": "True if the trade is a liquidation" + }, + { + "Parameter": "position_delta", + "Type": "PositionDelta", + "Description": "Position Delta from the trade" + }, + { + "Parameter": "payout", + "Type": "string", + "Description": "The payout associated with the trade" + }, + { + "Parameter": "fee", + "Type": "string", + "Description": "The fee associated with the trade" + }, + { + "Parameter": "executed_at", + "Type": "int64", + "Description": "Timestamp of trade execution in UNIX millis" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "A unique string that helps differentiate between trades" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Trade's execution side, marker/taker" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + }, + { + "Parameter": "pnl", + "Type": "string", + "Description": "Profit and loss of the trade" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/ExpiryFuturesMarketInfo.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/ExpiryFuturesMarketInfo.json new file mode 100644 index 00000000..3a1d0673 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/ExpiryFuturesMarketInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "Defines the expiration time for a time expiry futures market in UNIX seconds." + }, + { + "Parameter": "settlement_price", + "Type": "string", + "Description": "Defines the settlement price for a time expiry futures market." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPayment.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPayment.json new file mode 100644 index 00000000..494aa13f --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPayment.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that the position belongs to" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Amount of the funding payment" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Timestamp of funding payment in UNIX millis" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPaymentsRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPaymentsRequest.json new file mode 100644 index 00000000..427c28e8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPaymentsRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the positions from", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketIds of the funding payment we want to fetch. Using this for only one market id. This field is prioritized", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "Upper bound of funding payment updatedAt", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "Filter by market ids. Using this field for fetching funding payments from multiple market ids", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPaymentsResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPaymentsResponse.json new file mode 100644 index 00000000..8404a0fa --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingPaymentsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "payments", + "Type": "FundingPayment array", + "Description": "List of funding payments" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRate.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRate.json new file mode 100644 index 00000000..bdc6359a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRate.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "rate", + "Type": "string", + "Description": "Value of the funding rate" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Timestamp of funding rate in UNIX millis" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRatesRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRatesRequest.json new file mode 100644 index 00000000..d2fed517 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRatesRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the position we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "Upper bound of funding timestamp", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRatesResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRatesResponse.json new file mode 100644 index 00000000..4541adba --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/FundingRatesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "funding_rates", + "Type": "FundingRate array", + "Description": "List of funding rates" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/LiquidablePositionsRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/LiquidablePositionsRequest.json new file mode 100644 index 00000000..339f0cd9 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/LiquidablePositionsRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID to filter orders for specific market", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/LiquidablePositionsResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/LiquidablePositionsResponse.json new file mode 100644 index 00000000..78affdd8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/LiquidablePositionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "positions", + "Type": "DerivativePosition array", + "Description": "List of derivative positions" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketOpenInterest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketOpenInterest.json new file mode 100644 index 00000000..22a9fe1c --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketOpenInterest.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market we want to fetch open interest from" + }, + { + "Parameter": "open_interest", + "Type": "string", + "Description": "Open interest of the market" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketRequest.json new file mode 100644 index 00000000..3d8c5562 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market we want to fetch", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketResponse.json new file mode 100644 index 00000000..21963d70 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "DerivativeMarketInfo", + "Description": "Info about particular derivative market" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketsRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketsRequest.json new file mode 100644 index 00000000..0e129815 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketsRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_status", + "Type": "string", + "Description": "Filter by market status", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Filter by the Coin denomination of the quote currency", + "Required": "Yes" + }, + { + "Parameter": "market_statuses", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketsResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketsResponse.json new file mode 100644 index 00000000..939ef34a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/MarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "DerivativeMarketInfo array", + "Description": "Derivative Markets list" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OpenInterestRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OpenInterestRequest.json new file mode 100644 index 00000000..1f1d9b23 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OpenInterestRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_i_ds", + "Type": "string array", + "Description": "Specify multiple marketIDs to search.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OpenInterestResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OpenInterestResponse.json new file mode 100644 index 00000000..aee1c935 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OpenInterestResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "open_interests", + "Type": "MarketOpenInterest array", + "Description": "Open interest of the markets" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookLevelUpdates.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookLevelUpdates.json new file mode 100644 index 00000000..ad0f388b --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookLevelUpdates.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market's ID" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "orderbook update sequence" + }, + { + "Parameter": "buys", + "Type": "PriceLevelUpdate array", + "Description": "buy levels" + }, + { + "Parameter": "sells", + "Type": "PriceLevelUpdate array", + "Description": "sell levels" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "updates timestamp" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookV2Request.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookV2Request.json new file mode 100644 index 00000000..9fa98542 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookV2Request.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "depth", + "Type": "int32", + "Description": "Depth of the orderbook", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookV2Response.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookV2Response.json new file mode 100644 index 00000000..24beb3df --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbookV2Response.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orderbook", + "Type": "DerivativeLimitOrderbookV2", + "Description": "Orderbook of a particular derivative market" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbooksV2Request.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbooksV2Request.json new file mode 100644 index 00000000..26ae06de --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbooksV2Request.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets", + "Required": "Yes" + }, + { + "Parameter": "depth", + "Type": "int32", + "Description": "Depth of the orderbook", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbooksV2Response.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbooksV2Response.json new file mode 100644 index 00000000..01b6df3c --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrderbooksV2Response.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orderbooks", + "Type": "SingleDerivativeLimitOrderbookV2 array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersHistoryRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersHistoryRequest.json new file mode 100644 index 00000000..689bc42f --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersHistoryRequest.json @@ -0,0 +1,98 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount ID to filter orders for specific subaccount", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID to filter orders for specific market", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + }, + { + "Parameter": "order_types", + "Type": "string array", + "Description": "filter by order types", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "order side filter", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "Search for orders which createdAt >= startTime, time in millisecond", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "Search for orders which createdAt <= endTime, time in millisecond", + "Required": "Yes" + }, + { + "Parameter": "is_conditional", + "Type": "string", + "Description": "Only search for conditional/non-conditional orders", + "Required": "Yes" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "filter by order type", + "Required": "Yes" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Filter by order state", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "TradeId of the order we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "active_markets_only", + "Type": "bool", + "Description": "Return only orders for active markets", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersHistoryResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersHistoryResponse.json new file mode 100644 index 00000000..2abf7dfe --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersHistoryResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "orders", + "Type": "DerivativeOrderHistory array", + "Description": "List of historical derivative orders" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersRequest.json new file mode 100644 index 00000000..e763243e --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersRequest.json @@ -0,0 +1,86 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of market we want to fetch orders from. Using this field for one single marketId", + "Required": "Yes" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "Look for specific order side", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "Look for specific subaccountId of an order", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get order from, use this field for fetching orders from multiple markets", + "Required": "Yes" + }, + { + "Parameter": "is_conditional", + "Type": "string", + "Description": "Only search for conditional/non-conditional orders", + "Required": "Yes" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "Search for specific order type", + "Required": "Yes" + }, + { + "Parameter": "include_inactive", + "Type": "bool", + "Description": "Should include inactive orders", + "Required": "Yes" + }, + { + "Parameter": "subaccount_total_orders", + "Type": "bool", + "Description": "Choose to return subaccount total orders", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "TradeId of the order we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersResponse.json new file mode 100644 index 00000000..de3e0ca1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/OrdersResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "orders", + "Type": "DerivativeLimitOrder array", + "Description": "" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/Paging.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/Paging.json new file mode 100644 index 00000000..d11d26dc --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/Paging.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "total", + "Type": "int64", + "Description": "total number of txs saved in database" + }, + { + "Parameter": "from", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "to", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "count_by_subaccount", + "Type": "int64", + "Description": "count entries by subaccount, serving some places on helix" + }, + { + "Parameter": "next", + "Type": "string array", + "Description": "array of tokens to navigate to the next pages" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PerpetualMarketFunding.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PerpetualMarketFunding.json new file mode 100644 index 00000000..cab81d89 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PerpetualMarketFunding.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "cumulative_funding", + "Type": "string", + "Description": "Defines the cumulative funding of a perpetual market." + }, + { + "Parameter": "cumulative_price", + "Type": "string", + "Description": "Defines defines the cumulative price for the current hour up to the last timestamp." + }, + { + "Parameter": "last_timestamp", + "Type": "int64", + "Description": "Defines the last funding timestamp in seconds of a perpetual market in UNIX seconds." + }, + { + "Parameter": "last_funding_rate", + "Type": "string", + "Description": "Defines the last funding rate of a perpetual market." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PerpetualMarketInfo.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PerpetualMarketInfo.json new file mode 100644 index 00000000..5d0b87a2 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PerpetualMarketInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "hourly_funding_rate_cap", + "Type": "string", + "Description": "Defines the default maximum absolute value of the hourly funding rate of the perpetual market." + }, + { + "Parameter": "hourly_interest_rate", + "Type": "string", + "Description": "Defines the hourly interest rate of the perpetual market." + }, + { + "Parameter": "next_funding_timestamp", + "Type": "int64", + "Description": "Defines the next funding timestamp in seconds of a perpetual market in UNIX seconds." + }, + { + "Parameter": "funding_interval", + "Type": "int64", + "Description": "Defines the funding interval in seconds of a perpetual market in seconds." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionDelta.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionDelta.json new file mode 100644 index 00000000..150f250c --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionDelta.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "trade_direction", + "Type": "string", + "Description": "The direction the trade" + }, + { + "Parameter": "execution_price", + "Type": "string", + "Description": "Execution Price of the trade." + }, + { + "Parameter": "execution_quantity", + "Type": "string", + "Description": "Execution Quantity of the trade." + }, + { + "Parameter": "execution_margin", + "Type": "string", + "Description": "Execution Margin of the trade." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsRequest.json new file mode 100644 index 00000000..461f240a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsRequest.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the positions from", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the position we want to fetch. Use this field for fetching from single market", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets we want to filter. Use this field for fetching from multiple markets", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "filter by direction of the position", + "Required": "Yes" + }, + { + "Parameter": "subaccount_total_positions", + "Type": "bool", + "Description": "set to True to return subaccount total positions", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "filter by account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsResponse.json new file mode 100644 index 00000000..9470c22f --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "positions", + "Type": "DerivativePosition array", + "Description": "" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsV2Request.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsV2Request.json new file mode 100644 index 00000000..461f240a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsV2Request.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the positions from", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the position we want to fetch. Use this field for fetching from single market", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets we want to filter. Use this field for fetching from multiple markets", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "filter by direction of the position", + "Required": "Yes" + }, + { + "Parameter": "subaccount_total_positions", + "Type": "bool", + "Description": "set to True to return subaccount total positions", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "filter by account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsV2Response.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsV2Response.json new file mode 100644 index 00000000..0ca66d60 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PositionsV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "positions", + "Type": "DerivativePositionV2 array", + "Description": "" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PriceLevel.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PriceLevel.json new file mode 100644 index 00000000..d7ecf738 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PriceLevel.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "Price number of the price level." + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the price level." + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Price level last updated timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PriceLevelUpdate.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PriceLevelUpdate.json new file mode 100644 index 00000000..cc8351f5 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/PriceLevelUpdate.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "Price number of the price level." + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the price level." + }, + { + "Parameter": "is_active", + "Type": "bool", + "Description": "Price level status." + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Price level last updated timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SingleDerivativeLimitOrderbookV2.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SingleDerivativeLimitOrderbookV2.json new file mode 100644 index 00000000..8e628c74 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SingleDerivativeLimitOrderbookV2.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market's ID" + }, + { + "Parameter": "orderbook", + "Type": "DerivativeLimitOrderbookV2", + "Description": "Orderbook of the market" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamMarketRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamMarketRequest.json new file mode 100644 index 00000000..9f4e44fd --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamMarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "List of market IDs for updates streaming, empty means 'ALL' derivative markets", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamMarketResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamMarketResponse.json new file mode 100644 index 00000000..1973163c --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamMarketResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market", + "Type": "DerivativeMarketInfo", + "Description": "Info about particular derivative market" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookUpdateRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookUpdateRequest.json new file mode 100644 index 00000000..a22e347d --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookUpdateRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "List of market IDs for orderbook streaming, empty means 'ALL' derivative markets", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookUpdateResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookUpdateResponse.json new file mode 100644 index 00000000..6110599f --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookUpdateResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "orderbook_level_updates", + "Type": "OrderbookLevelUpdates", + "Description": "Orderbook level updates of a Derivative Market" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookV2Request.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookV2Request.json new file mode 100644 index 00000000..a22e347d --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookV2Request.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "List of market IDs for orderbook streaming, empty means 'ALL' derivative markets", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookV2Response.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookV2Response.json new file mode 100644 index 00000000..f3429832 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrderbookV2Response.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "orderbook", + "Type": "DerivativeLimitOrderbookV2", + "Description": "Orderbook of a Derivative Market" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersHistoryRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersHistoryRequest.json new file mode 100644 index 00000000..816a846a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersHistoryRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount ID to filter orders for specific subaccount", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID to filter orders for specific market", + "Required": "Yes" + }, + { + "Parameter": "order_types", + "Type": "string array", + "Description": "filter by order types", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "order side filter", + "Required": "Yes" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Filter by order state", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersHistoryResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersHistoryResponse.json new file mode 100644 index 00000000..77c4d074 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersHistoryResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order", + "Type": "DerivativeOrderHistory", + "Description": "Updated order" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersRequest.json new file mode 100644 index 00000000..e763243e --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersRequest.json @@ -0,0 +1,86 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of market we want to fetch orders from. Using this field for one single marketId", + "Required": "Yes" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "Look for specific order side", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "Look for specific subaccountId of an order", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get order from, use this field for fetching orders from multiple markets", + "Required": "Yes" + }, + { + "Parameter": "is_conditional", + "Type": "string", + "Description": "Only search for conditional/non-conditional orders", + "Required": "Yes" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "Search for specific order type", + "Required": "Yes" + }, + { + "Parameter": "include_inactive", + "Type": "bool", + "Description": "Should include inactive orders", + "Required": "Yes" + }, + { + "Parameter": "subaccount_total_orders", + "Type": "bool", + "Description": "Choose to return subaccount total orders", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "TradeId of the order we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersResponse.json new file mode 100644 index 00000000..6850f0c6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamOrdersResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order", + "Type": "DerivativeLimitOrder", + "Description": "Updated market order" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsRequest.json new file mode 100644 index 00000000..b6aae445 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the positions from", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Backward compat single market ID of position we want to stream", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "List of market IDs of the positions we want to stream", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get positions", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "filter by account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsResponse.json new file mode 100644 index 00000000..af21ae04 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "position", + "Type": "DerivativePosition", + "Description": "Updated derivative Position" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsV2Request.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsV2Request.json new file mode 100644 index 00000000..b6aae445 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsV2Request.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the positions from", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Backward compat single market ID of position we want to stream", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "List of market IDs of the positions we want to stream", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get positions", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "filter by account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsV2Response.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsV2Response.json new file mode 100644 index 00000000..7593bc91 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamPositionsV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "position", + "Type": "DerivativePositionV2", + "Description": "Updated derivative Position" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesRequest.json new file mode 100644 index 00000000..68cf533a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesRequest.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Filter by execution side of the trade", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction the trade", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get trades. Use this field for fetching trades from multiple subaccounts", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Filter by the tradeId of the trade", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Filter by fee recipient", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesResponse.json new file mode 100644 index 00000000..28018828 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "trade", + "Type": "DerivativeTrade", + "Description": "New derivative market trade" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Executed trades update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesV2Request.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesV2Request.json new file mode 100644 index 00000000..68cf533a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesV2Request.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Filter by execution side of the trade", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction the trade", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get trades. Use this field for fetching trades from multiple subaccounts", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Filter by the tradeId of the trade", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Filter by fee recipient", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesV2Response.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesV2Response.json new file mode 100644 index 00000000..28018828 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/StreamTradesV2Response.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "trade", + "Type": "DerivativeTrade", + "Description": "New derivative market trade" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Executed trades update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountOrdersListRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountOrdersListRequest.json new file mode 100644 index 00000000..e135b7cd --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountOrdersListRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount ID to filter orders for specific subaccount", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID to filter orders for specific market", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountOrdersListResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountOrdersListResponse.json new file mode 100644 index 00000000..75a996c2 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountOrdersListResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "orders", + "Type": "DerivativeLimitOrder array", + "Description": "List of derivative orders" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountTradesListRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountTradesListRequest.json new file mode 100644 index 00000000..a53db4bd --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountTradesListRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Filter trades by market ID", + "Required": "Yes" + }, + { + "Parameter": "execution_type", + "Type": "string", + "Description": "Filter by execution type of trades", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction trades", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountTradesListResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountTradesListResponse.json new file mode 100644 index 00000000..b116eaf1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/SubaccountTradesListResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "trades", + "Type": "DerivativeTrade array", + "Description": "List of derivative market trades" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TokenMeta.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TokenMeta.json new file mode 100644 index 00000000..0a644cab --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TokenMeta.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "Token full name" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "Token contract address (native or not)" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "Token symbol short name" + }, + { + "Parameter": "logo", + "Type": "string", + "Description": "URL to the logo image" + }, + { + "Parameter": "decimals", + "Type": "int32", + "Description": "Token decimals" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Token metadata fetched timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesRequest.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesRequest.json new file mode 100644 index 00000000..68cf533a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesRequest.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Filter by execution side of the trade", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction the trade", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get trades. Use this field for fetching trades from multiple subaccounts", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Filter by the tradeId of the trade", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Filter by fee recipient", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesResponse.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesResponse.json new file mode 100644 index 00000000..acbf6d62 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "trades", + "Type": "DerivativeTrade array", + "Description": "Trades of a Derivative Market" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesV2Request.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesV2Request.json new file mode 100644 index 00000000..68cf533a --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesV2Request.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Filter by execution side of the trade", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction the trade", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get trades. Use this field for fetching trades from multiple subaccounts", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Filter by the tradeId of the trade", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Filter by fee recipient", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesV2Response.json b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesV2Response.json new file mode 100644 index 00000000..acbf6d62 --- /dev/null +++ b/source/json_tables/indexer_new/injective_derivative_exchange_rpc/TradesV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "trades", + "Type": "DerivativeTrade array", + "Description": "Trades of a Derivative Market" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastCosmosTxRequest.json b/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastCosmosTxRequest.json new file mode 100644 index 00000000..403eaa62 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastCosmosTxRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "tx", + "Type": "byte array", + "Description": "proto encoded tx", + "Required": "Yes" + }, + { + "Parameter": "pub_key", + "Type": "CosmosPubKey", + "Description": "Specify ethsecp256k1 sender pubkey", + "Required": "No" + }, + { + "Parameter": "signature", + "Type": "string", + "Description": "Hex-encoded ethsecp256k1 sender signature bytes", + "Required": "Yes" + }, + { + "Parameter": "sender_address", + "Type": "string", + "Description": "sender address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastCosmosTxResponse.json b/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastCosmosTxResponse.json new file mode 100644 index 00000000..8d035987 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastCosmosTxResponse.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Hex-encoded Tendermint transaction hash" + }, + { + "Parameter": "height", + "Type": "int64", + "Description": "The block height" + }, + { + "Parameter": "index", + "Type": "uint32", + "Description": "Tx index in the block" + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "Namespace for the resp code" + }, + { + "Parameter": "code", + "Type": "uint32", + "Description": "Response code" + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "Result bytes, if any" + }, + { + "Parameter": "raw_log", + "Type": "string", + "Description": "The output of the application's logger (raw string). May be non-deterministic." + }, + { + "Parameter": "timestamp", + "Type": "string", + "Description": "Time of the previous block." + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastTxRequest.json b/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastTxRequest.json new file mode 100644 index 00000000..14dd1688 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastTxRequest.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "chain_id", + "Type": "uint64", + "Description": "Specify Web3 chainID (from prepateTx) for the target Tx", + "Required": "Yes" + }, + { + "Parameter": "tx", + "Type": "byte array", + "Description": "Amino-encoded Tx JSON data (except Msgs)", + "Required": "Yes" + }, + { + "Parameter": "msgs", + "Type": "][byte array", + "Description": "List of Cosmos proto3-encoded Msgs from tx", + "Required": "Yes" + }, + { + "Parameter": "pub_key", + "Type": "CosmosPubKey", + "Description": "Specify ethsecp256k1 pubkey of the signer", + "Required": "No" + }, + { + "Parameter": "signature", + "Type": "string", + "Description": "Hex-encoded ethsecp256k1 signature bytes", + "Required": "Yes" + }, + { + "Parameter": "fee_payer", + "Type": "string", + "Description": "Fee payer address provided by service", + "Required": "Yes" + }, + { + "Parameter": "fee_payer_sig", + "Type": "string", + "Description": "Hex-encoded ethsecp256k1 signature bytes from fee payer", + "Required": "Yes" + }, + { + "Parameter": "mode", + "Type": "string", + "Description": "Broadcast mode", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastTxResponse.json b/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastTxResponse.json new file mode 100644 index 00000000..8d035987 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/BroadcastTxResponse.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Hex-encoded Tendermint transaction hash" + }, + { + "Parameter": "height", + "Type": "int64", + "Description": "The block height" + }, + { + "Parameter": "index", + "Type": "uint32", + "Description": "Tx index in the block" + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "Namespace for the resp code" + }, + { + "Parameter": "code", + "Type": "uint32", + "Description": "Response code" + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "Result bytes, if any" + }, + { + "Parameter": "raw_log", + "Type": "string", + "Description": "The output of the application's logger (raw string). May be non-deterministic." + }, + { + "Parameter": "timestamp", + "Type": "string", + "Description": "Time of the previous block." + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/CosmosCoin.json b/source/json_tables/indexer_new/injective_exchange_rpc/CosmosCoin.json new file mode 100644 index 00000000..f47834b3 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/CosmosCoin.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Coin denominator" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Coin amount (big int)" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/CosmosPubKey.json b/source/json_tables/indexer_new/injective_exchange_rpc/CosmosPubKey.json new file mode 100644 index 00000000..c6720c83 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/CosmosPubKey.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "type", + "Type": "string", + "Description": "Pubkey type URL" + }, + { + "Parameter": "key", + "Type": "string", + "Description": "Hex-encoded string of the public key" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/CosmosTxFee.json b/source/json_tables/indexer_new/injective_exchange_rpc/CosmosTxFee.json new file mode 100644 index 00000000..8f82d4ce --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/CosmosTxFee.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "price", + "Type": "CosmosCoin array", + "Description": "Transaction gas price" + }, + { + "Parameter": "gas", + "Type": "uint64", + "Description": "Transaction gas limit" + }, + { + "Parameter": "delegate_fee", + "Type": "bool", + "Description": "Explicitly require fee delegation when set to true. Or don't care = false. Will be replaced by other flag in the next version." + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/GetFeePayerResponse.json b/source/json_tables/indexer_new/injective_exchange_rpc/GetFeePayerResponse.json new file mode 100644 index 00000000..99bf97ac --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/GetFeePayerResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "fee_payer", + "Type": "string", + "Description": "Fee payer address provided by service" + }, + { + "Parameter": "fee_payer_pub_key", + "Type": "CosmosPubKey", + "Description": "ethsecp256k1 feePayer pubkey" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/GetTxRequest.json b/source/json_tables/indexer_new/injective_exchange_rpc/GetTxRequest.json new file mode 100644 index 00000000..6cc89354 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/GetTxRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "hash", + "Type": "string", + "Description": "Transaction hash in hex without 0x prefix (Cosmos-like).", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/GetTxResponse.json b/source/json_tables/indexer_new/injective_exchange_rpc/GetTxResponse.json new file mode 100644 index 00000000..8d035987 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/GetTxResponse.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Hex-encoded Tendermint transaction hash" + }, + { + "Parameter": "height", + "Type": "int64", + "Description": "The block height" + }, + { + "Parameter": "index", + "Type": "uint32", + "Description": "Tx index in the block" + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "Namespace for the resp code" + }, + { + "Parameter": "code", + "Type": "uint32", + "Description": "Response code" + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "Result bytes, if any" + }, + { + "Parameter": "raw_log", + "Type": "string", + "Description": "The output of the application's logger (raw string). May be non-deterministic." + }, + { + "Parameter": "timestamp", + "Type": "string", + "Description": "Time of the previous block." + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/PrepareCosmosTxRequest.json b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareCosmosTxRequest.json new file mode 100644 index 00000000..d9d20e8c --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareCosmosTxRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "chain_id", + "Type": "uint64", + "Description": "Specify chainID for the target tx", + "Required": "Yes" + }, + { + "Parameter": "sender_address", + "Type": "string", + "Description": "sender address provided", + "Required": "Yes" + }, + { + "Parameter": "memo", + "Type": "string", + "Description": "Textual memo information to attach with tx", + "Required": "Yes" + }, + { + "Parameter": "timeout_height", + "Type": "uint64", + "Description": "Block height until which the transaction is valid.", + "Required": "Yes" + }, + { + "Parameter": "fee", + "Type": "CosmosTxFee", + "Description": "Transaction fee details.", + "Required": "No" + }, + { + "Parameter": "msgs", + "Type": "][byte array", + "Description": "List of Cosmos proto3-encoded Msgs to include in a single tx", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/PrepareCosmosTxResponse.json b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareCosmosTxResponse.json new file mode 100644 index 00000000..4efd946f --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareCosmosTxResponse.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "tx", + "Type": "byte array", + "Description": "proto encoded tx" + }, + { + "Parameter": "sign_mode", + "Type": "string", + "Description": "Sign mode for the resulting tx" + }, + { + "Parameter": "pub_key_type", + "Type": "string", + "Description": "Specify proto-URL of a public key, which defines the signature format" + }, + { + "Parameter": "fee_payer", + "Type": "string", + "Description": "Fee payer address provided by service" + }, + { + "Parameter": "fee_payer_sig", + "Type": "string", + "Description": "Hex-encoded ethsecp256k1 signature bytes from fee payer" + }, + { + "Parameter": "fee_payer_pub_key", + "Type": "CosmosPubKey", + "Description": "ethsecp256k1 feePayer pubkey" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/PrepareEip712Request.json b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareEip712Request.json new file mode 100644 index 00000000..a9dc04ed --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareEip712Request.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "chain_id", + "Type": "uint64", + "Description": "Specify chainID for the target tx", + "Required": "Yes" + }, + { + "Parameter": "signer_address", + "Type": "string", + "Description": "Specify Ethereum address of a signer", + "Required": "Yes" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "Sequence number of the transaction signer", + "Required": "Yes" + }, + { + "Parameter": "account_number", + "Type": "uint64", + "Description": "Account number of the transaction signer", + "Required": "Yes" + }, + { + "Parameter": "memo", + "Type": "string", + "Description": "Textual memo information to attach with tx", + "Required": "Yes" + }, + { + "Parameter": "timeout_height", + "Type": "uint64", + "Description": "Block height until which the transaction is valid.", + "Required": "Yes" + }, + { + "Parameter": "fee", + "Type": "CosmosTxFee", + "Description": "Transaction fee details.", + "Required": "No" + }, + { + "Parameter": "msgs", + "Type": "][byte array", + "Description": "List of Cosmos proto3-encoded Msgs to include in a single tx", + "Required": "Yes" + }, + { + "Parameter": "eip712_wrapper", + "Type": "string", + "Description": "The wrapper of the EIP712 message, 'v1'/'v2' or 'V1'/'V2'", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/PrepareEip712Response.json b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareEip712Response.json new file mode 100644 index 00000000..0510b231 --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareEip712Response.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "data", + "Type": "string", + "Description": "EIP712-compatible message suitable for signing with eth_signTypedData_v4" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/PrepareTxRequest.json b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareTxRequest.json new file mode 100644 index 00000000..1395930f --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareTxRequest.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "chain_id", + "Type": "uint64", + "Description": "Specify chainID for the target tx", + "Required": "Yes" + }, + { + "Parameter": "signer_address", + "Type": "string", + "Description": "Specify Ethereum address of a signer", + "Required": "Yes" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "Deprecated: this field is ignored", + "Required": "Yes" + }, + { + "Parameter": "memo", + "Type": "string", + "Description": "Textual memo information to attach with tx", + "Required": "Yes" + }, + { + "Parameter": "timeout_height", + "Type": "uint64", + "Description": "Block height until which the transaction is valid.", + "Required": "Yes" + }, + { + "Parameter": "fee", + "Type": "CosmosTxFee", + "Description": "Transaction fee details.", + "Required": "No" + }, + { + "Parameter": "msgs", + "Type": "][byte array", + "Description": "List of Cosmos proto3-encoded Msgs to include in a single tx", + "Required": "Yes" + }, + { + "Parameter": "eip712_wrapper", + "Type": "string", + "Description": "The wrapper of the EIP712 message, 'v1'/'v2' or 'V1'/'V2'", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_exchange_rpc/PrepareTxResponse.json b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareTxResponse.json new file mode 100644 index 00000000..ddcf865a --- /dev/null +++ b/source/json_tables/indexer_new/injective_exchange_rpc/PrepareTxResponse.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "data", + "Type": "string", + "Description": "EIP712-compatible message suitable for signing with eth_signTypedData_v4" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "Account tx sequence (nonce)" + }, + { + "Parameter": "sign_mode", + "Type": "string", + "Description": "Sign mode for the resulting tx" + }, + { + "Parameter": "pub_key_type", + "Type": "string", + "Description": "Specify proto-URL of a public key, which defines the signature format" + }, + { + "Parameter": "fee_payer", + "Type": "string", + "Description": "Fee payer address provided by service" + }, + { + "Parameter": "fee_payer_sig", + "Type": "string", + "Description": "Hex-encoded ethsecp256k1 signature bytes from fee payer" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/BankTransfer.json b/source/json_tables/indexer_new/injective_explorer_rpc/BankTransfer.json new file mode 100644 index 00000000..eeb969ee --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/BankTransfer.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "" + }, + { + "Parameter": "recipient", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amounts", + "Type": "Coin array", + "Description": "Amounts transferred" + }, + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "block_timestamp", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/BlockDetailInfo.json b/source/json_tables/indexer_new/injective_explorer_rpc/BlockDetailInfo.json new file mode 100644 index 00000000..d625de60 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/BlockDetailInfo.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "proposer", + "Type": "string", + "Description": "" + }, + { + "Parameter": "moniker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "parent_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "num_pre_commits", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "num_txs", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "total_txs", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "txs", + "Type": "TxData array", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_unix_timestamp", + "Type": "uint64", + "Description": "Block timestamp in unix milli" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/BlockInfo.json b/source/json_tables/indexer_new/injective_explorer_rpc/BlockInfo.json new file mode 100644 index 00000000..1d6f59ec --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/BlockInfo.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "proposer", + "Type": "string", + "Description": "" + }, + { + "Parameter": "moniker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "parent_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "num_pre_commits", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "num_txs", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "txs", + "Type": "TxDataRPC array", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_unix_timestamp", + "Type": "uint64", + "Description": "Block timestamp in unix milli" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Checksum.json b/source/json_tables/indexer_new/injective_explorer_rpc/Checksum.json new file mode 100644 index 00000000..a7880471 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Checksum.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "algorithm", + "Type": "string", + "Description": "Algorithm of hash function" + }, + { + "Parameter": "hash", + "Type": "string", + "Description": "Hash if apply algorithm to the cosmwasm bytecode" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Coin.json b/source/json_tables/indexer_new/injective_explorer_rpc/Coin.json new file mode 100644 index 00000000..8fa4b17b --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Coin.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of the coin" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "usd_value", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/ContractFund.json b/source/json_tables/indexer_new/injective_explorer_rpc/ContractFund.json new file mode 100644 index 00000000..ce93a46a --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/ContractFund.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denominator" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Amount of denom" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/ContractPermission.json b/source/json_tables/indexer_new/injective_explorer_rpc/ContractPermission.json new file mode 100644 index 00000000..790695d8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/ContractPermission.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "access_type", + "Type": "int32", + "Description": "Access type of instantiation" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "Account address" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/CosmosCoin.json b/source/json_tables/indexer_new/injective_explorer_rpc/CosmosCoin.json new file mode 100644 index 00000000..f47834b3 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/CosmosCoin.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Coin denominator" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Coin amount (big int)" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Cursor.json b/source/json_tables/indexer_new/injective_explorer_rpc/Cursor.json new file mode 100644 index 00000000..a40b7597 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Cursor.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "next", + "Type": "string array", + "Description": "array of tokens to navigate to the next pages" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Cw20MarketingInfo.json b/source/json_tables/indexer_new/injective_explorer_rpc/Cw20MarketingInfo.json new file mode 100644 index 00000000..abff0fd8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Cw20MarketingInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "project", + "Type": "string", + "Description": "Project information" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "Token's description" + }, + { + "Parameter": "logo", + "Type": "string", + "Description": "logo (url/embedded)" + }, + { + "Parameter": "marketing", + "Type": "byte array", + "Description": "A random field for additional marketing info" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Cw20Metadata.json b/source/json_tables/indexer_new/injective_explorer_rpc/Cw20Metadata.json new file mode 100644 index 00000000..b3e8508e --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Cw20Metadata.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "token_info", + "Type": "Cw20TokenInfo", + "Description": "" + }, + { + "Parameter": "marketing_info", + "Type": "Cw20MarketingInfo", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Cw20TokenInfo.json b/source/json_tables/indexer_new/injective_explorer_rpc/Cw20TokenInfo.json new file mode 100644 index 00000000..10fa5a06 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Cw20TokenInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "General name of the token" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "Symbol of then token" + }, + { + "Parameter": "decimals", + "Type": "int64", + "Description": "Decimal places of token" + }, + { + "Parameter": "total_supply", + "Type": "string", + "Description": "Token's total supply" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GasFee.json b/source/json_tables/indexer_new/injective_explorer_rpc/GasFee.json new file mode 100644 index 00000000..5e6fb248 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GasFee.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "amount", + "Type": "CosmosCoin array", + "Description": "" + }, + { + "Parameter": "gas_limit", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "payer", + "Type": "string", + "Description": "" + }, + { + "Parameter": "granter", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsRequest.json new file mode 100644 index 00000000..5447efc3 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsRequest.json @@ -0,0 +1,74 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "Address of account", + "Required": "Yes" + }, + { + "Parameter": "before", + "Type": "uint64", + "Description": "Return transactions before this block number", + "Required": "Yes" + }, + { + "Parameter": "after", + "Type": "uint64", + "Description": "Return transactions after this block number", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "module", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "from_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "to_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the txs must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the txs must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "status", + "Type": "string", + "Description": "The status of the txs to be returned", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsResponse.json new file mode 100644 index 00000000..e58a640d --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "data", + "Type": "TxDetailData array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsV2Request.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsV2Request.json new file mode 100644 index 00000000..7bf5a7cc --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsV2Request.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "Address of account", + "Required": "Yes" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "Comma-separated list of msg types", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the txs must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the txs must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "per_page", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token", + "Type": "string", + "Description": "Pagination token", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsV2Response.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsV2Response.json new file mode 100644 index 00000000..7c6272a1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetAccountTxsV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Cursor", + "Description": "" + }, + { + "Parameter": "data", + "Type": "TxDetailData array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetBankTransfersRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetBankTransfersRequest.json new file mode 100644 index 00000000..b278f569 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetBankTransfersRequest.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "senders", + "Type": "string array", + "Description": "Transfer sender address", + "Required": "Yes" + }, + { + "Parameter": "recipients", + "Type": "string array", + "Description": "Transfer recipient address", + "Required": "Yes" + }, + { + "Parameter": "is_community_pool_related", + "Type": "bool", + "Description": "Returns transfers with the community pool address as either sender or recipient", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the transfers must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the transfers must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "address", + "Type": "string array", + "Description": "Transfers where either the sender or the recipient is one of the addresses", + "Required": "Yes" + }, + { + "Parameter": "per_page", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetBankTransfersResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetBankTransfersResponse.json new file mode 100644 index 00000000..b892c61e --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetBankTransfersResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "data", + "Type": "BankTransfer array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetBlockRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlockRequest.json new file mode 100644 index 00000000..134ec861 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlockRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetBlockResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlockResponse.json new file mode 100644 index 00000000..7c5116a6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlockResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "errmsg", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "BlockDetailInfo", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksRequest.json new file mode 100644 index 00000000..06a47e31 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "before", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "after", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "from", + "Type": "uint64", + "Description": "Unix timestamp (UTC) in milliseconds", + "Required": "Yes" + }, + { + "Parameter": "to", + "Type": "uint64", + "Description": "Unix timestamp (UTC) in milliseconds", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksResponse.json new file mode 100644 index 00000000..6e599dc3 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "data", + "Type": "BlockInfo array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksV2Request.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksV2Request.json new file mode 100644 index 00000000..577d6071 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksV2Request.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "per_page", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksV2Response.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksV2Response.json new file mode 100644 index 00000000..4bda18c1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetBlocksV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Cursor", + "Description": "" + }, + { + "Parameter": "data", + "Type": "BlockInfo array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsRequest.json new file mode 100644 index 00000000..5c19daf4 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "Address of contract", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "from_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "to_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsResponse.json new file mode 100644 index 00000000..e58a640d --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "data", + "Type": "TxDetailData array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsV2Request.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsV2Request.json new file mode 100644 index 00000000..cac5c431 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsV2Request.json @@ -0,0 +1,44 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "Address of contract", + "Required": "Yes" + }, + { + "Parameter": "height", + "Type": "uint64", + "Description": "Height of the block", + "Required": "Yes" + }, + { + "Parameter": "from", + "Type": "int64", + "Description": "Unix timestamp (UTC) in milliseconds", + "Required": "Yes" + }, + { + "Parameter": "to", + "Type": "int64", + "Description": "Unix timestamp (UTC) in milliseconds", + "Required": "Yes" + }, + { + "Parameter": "per_page", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token", + "Type": "string", + "Description": "Pagination token", + "Required": "Yes" + }, + { + "Parameter": "status", + "Type": "string", + "Description": "The status of the txs to be returned", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsV2Response.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsV2Response.json new file mode 100644 index 00000000..7c6272a1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetContractTxsV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Cursor", + "Description": "" + }, + { + "Parameter": "data", + "Type": "TxDetailData array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetCw20BalanceRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetCw20BalanceRequest.json new file mode 100644 index 00000000..d8960026 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetCw20BalanceRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address to list balance of", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetCw20BalanceResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetCw20BalanceResponse.json new file mode 100644 index 00000000..5c066c0b --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetCw20BalanceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "field", + "Type": "WasmCw20Balance array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetIBCTransferTxsRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetIBCTransferTxsRequest.json new file mode 100644 index 00000000..05b8e18e --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetIBCTransferTxsRequest.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "receiver", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "src_channel", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "src_port", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "dest_channel", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "dest_port", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetIBCTransferTxsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetIBCTransferTxsResponse.json new file mode 100644 index 00000000..8bd4f949 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetIBCTransferTxsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "field", + "Type": "IBCTransferTx array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyDepositTxsRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyDepositTxsRequest.json new file mode 100644 index 00000000..617f5fed --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyDepositTxsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Sender address of deposit request", + "Required": "Yes" + }, + { + "Parameter": "receiver", + "Type": "string", + "Description": "Address of receiveer upon deposit", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyDepositTxsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyDepositTxsResponse.json new file mode 100644 index 00000000..408acf2d --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyDepositTxsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "field", + "Type": "PeggyDepositTx array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyWithdrawalTxsRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyWithdrawalTxsRequest.json new file mode 100644 index 00000000..cce87cb3 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyWithdrawalTxsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Sender address of withdrawal request", + "Required": "Yes" + }, + { + "Parameter": "receiver", + "Type": "string", + "Description": "Address of receiveer upon withdrawal", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyWithdrawalTxsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyWithdrawalTxsResponse.json new file mode 100644 index 00000000..085390ca --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetPeggyWithdrawalTxsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "field", + "Type": "PeggyWithdrawalTx array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetStatsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetStatsResponse.json new file mode 100644 index 00000000..e8c2e1e1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetStatsResponse.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "addresses", + "Type": "uint64", + "Description": "Total of unique addresses" + }, + { + "Parameter": "assets", + "Type": "uint64", + "Description": "Total number of assets" + }, + { + "Parameter": "inj_supply", + "Type": "uint64", + "Description": "Total circulating supply of INJ" + }, + { + "Parameter": "txs_ps24_h", + "Type": "uint64", + "Description": "Avg of TX per second in the past 24hs" + }, + { + "Parameter": "txs_ps100_b", + "Type": "uint64", + "Description": "Avg of TX per second in the 100 blocks" + }, + { + "Parameter": "txs_total", + "Type": "uint64", + "Description": "Total number of TXs" + }, + { + "Parameter": "txs24_h", + "Type": "uint64", + "Description": "Total number of TXs in the past 24hs" + }, + { + "Parameter": "txs30_d", + "Type": "uint64", + "Description": "Total number of TXs in the past 30 days" + }, + { + "Parameter": "block_count24_h", + "Type": "uint64", + "Description": "Number of blocks produced in the past 24hs" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetTxByTxHashRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxByTxHashRequest.json new file mode 100644 index 00000000..54bad2eb --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxByTxHashRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "hash", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetTxByTxHashResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxByTxHashResponse.json new file mode 100644 index 00000000..1be1c81d --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxByTxHashResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "errmsg", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "TxDetailData", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsRequest.json new file mode 100644 index 00000000..bbfd0ecd --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsRequest.json @@ -0,0 +1,68 @@ +[ + { + "Parameter": "before", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "after", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "module", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "from_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "to_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the txs must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the txs must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "status", + "Type": "string", + "Description": "The status of the txs to be returned", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsResponse.json new file mode 100644 index 00000000..1e66b683 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "data", + "Type": "TxData array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsV2Request.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsV2Request.json new file mode 100644 index 00000000..431bdc9c --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsV2Request.json @@ -0,0 +1,44 @@ +[ + { + "Parameter": "type", + "Type": "string", + "Description": "Comma-separated list of msg types", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the txs must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the txs must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "per_page", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "status", + "Type": "string", + "Description": "The status of the txs to be returned", + "Required": "Yes" + }, + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsV2Response.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsV2Response.json new file mode 100644 index 00000000..6177354d --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetTxsV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Cursor", + "Description": "" + }, + { + "Parameter": "data", + "Type": "TxData array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorRequest.json new file mode 100644 index 00000000..4b3e99c1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorResponse.json new file mode 100644 index 00000000..9a556429 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "errmsg", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "Validator", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorUptimeRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorUptimeRequest.json new file mode 100644 index 00000000..4b3e99c1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorUptimeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorUptimeResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorUptimeResponse.json new file mode 100644 index 00000000..5a8594bf --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorUptimeResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "errmsg", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "ValidatorUptime array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorsResponse.json new file mode 100644 index 00000000..d40ce93f --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetValidatorsResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "s", + "Type": "string", + "Description": "Status of the response." + }, + { + "Parameter": "errmsg", + "Type": "string", + "Description": "Error message." + }, + { + "Parameter": "data", + "Type": "Validator array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodeByIDRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodeByIDRequest.json new file mode 100644 index 00000000..91914c9d --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodeByIDRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "code_id", + "Type": "int64", + "Description": "Code ID of the code", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodeByIDResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodeByIDResponse.json new file mode 100644 index 00000000..ba0e359c --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodeByIDResponse.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "code_id", + "Type": "uint64", + "Description": "ID of stored wasmcode, sorted in descending order" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Tx hash of store code transaction" + }, + { + "Parameter": "checksum", + "Type": "Checksum", + "Description": "Checksum of the cosmwasm code" + }, + { + "Parameter": "created_at", + "Type": "uint64", + "Description": "Block time when the code is stored, in millisecond" + }, + { + "Parameter": "contract_type", + "Type": "string", + "Description": "Contract type of the wasm code" + }, + { + "Parameter": "version", + "Type": "string", + "Description": "version string of the wasm code" + }, + { + "Parameter": "permission", + "Type": "ContractPermission", + "Description": "describe instantiate permission" + }, + { + "Parameter": "code_schema", + "Type": "string", + "Description": "code schema preview" + }, + { + "Parameter": "code_view", + "Type": "string", + "Description": "code repo preview, may contain schema folder" + }, + { + "Parameter": "instantiates", + "Type": "uint64", + "Description": "count number of contract instantiation from this code" + }, + { + "Parameter": "creator", + "Type": "string", + "Description": "creator of this code" + }, + { + "Parameter": "code_number", + "Type": "int64", + "Description": "monotonic order of the code stored" + }, + { + "Parameter": "proposal_id", + "Type": "int64", + "Description": "id of the proposal that store this code" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodesRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodesRequest.json new file mode 100644 index 00000000..94559ead --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodesRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "from_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "to_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodesResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodesResponse.json new file mode 100644 index 00000000..80d92127 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmCodesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "data", + "Type": "WasmCode array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractByAddressRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractByAddressRequest.json new file mode 100644 index 00000000..5089fb4e --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractByAddressRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Contract address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractByAddressResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractByAddressResponse.json new file mode 100644 index 00000000..47a36a9d --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractByAddressResponse.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "label", + "Type": "string", + "Description": "General name of the contract" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "Address of the contract" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "hash of the instantiate transaction" + }, + { + "Parameter": "creator", + "Type": "string", + "Description": "Address of the contract creator" + }, + { + "Parameter": "executes", + "Type": "uint64", + "Description": "Number of times call to execute contract" + }, + { + "Parameter": "instantiated_at", + "Type": "uint64", + "Description": "Block timestamp that contract was instantiated, in millisecond" + }, + { + "Parameter": "init_message", + "Type": "string", + "Description": "init message when this contract was instantiated" + }, + { + "Parameter": "last_executed_at", + "Type": "uint64", + "Description": "Block timestamp that contract was called, in millisecond" + }, + { + "Parameter": "funds", + "Type": "ContractFund array", + "Description": "Contract funds" + }, + { + "Parameter": "code_id", + "Type": "uint64", + "Description": "Code id of the contract" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "Admin of the contract" + }, + { + "Parameter": "current_migrate_message", + "Type": "string", + "Description": "Latest migrate message of the contract" + }, + { + "Parameter": "contract_number", + "Type": "int64", + "Description": "Monotonic contract number in database" + }, + { + "Parameter": "version", + "Type": "string", + "Description": "Contract version string" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "Contract type" + }, + { + "Parameter": "cw20_metadata", + "Type": "Cw20Metadata", + "Description": "" + }, + { + "Parameter": "proposal_id", + "Type": "int64", + "Description": "id of the proposal that instantiate this contract" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractsRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractsRequest.json new file mode 100644 index 00000000..1b5e0bd3 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractsRequest.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "code_id", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "from_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "to_number", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "assets_only", + "Type": "bool", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "int64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "label", + "Type": "string", + "Description": "Label of the contract", + "Required": "Yes" + }, + { + "Parameter": "token", + "Type": "string", + "Description": "Token name or symbol to filter by", + "Required": "Yes" + }, + { + "Parameter": "lookup", + "Type": "string", + "Description": "Text to lookup by", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractsResponse.json new file mode 100644 index 00000000..13dd9d22 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/GetWasmContractsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + }, + { + "Parameter": "data", + "Type": "WasmContract array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/IBCTransferTx.json b/source/json_tables/indexer_new/injective_explorer_rpc/IBCTransferTx.json new file mode 100644 index 00000000..87e4733e --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/IBCTransferTx.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender address" + }, + { + "Parameter": "receiver", + "Type": "string", + "Description": "the recipient address on the destination chain" + }, + { + "Parameter": "source_port", + "Type": "string", + "Description": "the port on which the packet will be sent" + }, + { + "Parameter": "source_channel", + "Type": "string", + "Description": "the channel by which the packet will be sent" + }, + { + "Parameter": "destination_port", + "Type": "string", + "Description": "identifies the port on the receiving chain" + }, + { + "Parameter": "destination_channel", + "Type": "string", + "Description": "identifies the channel end on the receiving chain" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "transfer amount" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "transafer denom" + }, + { + "Parameter": "timeout_height", + "Type": "string", + "Description": "Timeout height relative to the current block height. The timeout is disabled when set to 0" + }, + { + "Parameter": "timeout_timestamp", + "Type": "uint64", + "Description": "Timeout timestamp (in nanoseconds) relative to the current block timestamp" + }, + { + "Parameter": "packet_sequence", + "Type": "uint64", + "Description": "number corresponds to the order of sends and receives, where a Packet with an earlier sequence number must be sent and received before a Packet with a later sequence number" + }, + { + "Parameter": "data_hex", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "" + }, + { + "Parameter": "tx_hashes", + "Type": "string array", + "Description": "it's injective chain tx hash array" + }, + { + "Parameter": "created_at", + "Type": "string", + "Description": "" + }, + { + "Parameter": "updated_at", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Paging.json b/source/json_tables/indexer_new/injective_explorer_rpc/Paging.json new file mode 100644 index 00000000..d11d26dc --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Paging.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "total", + "Type": "int64", + "Description": "total number of txs saved in database" + }, + { + "Parameter": "from", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "to", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "count_by_subaccount", + "Type": "int64", + "Description": "count entries by subaccount, serving some places on helix" + }, + { + "Parameter": "next", + "Type": "string array", + "Description": "array of tokens to navigate to the next pages" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/PeggyDepositTx.json b/source/json_tables/indexer_new/injective_explorer_rpc/PeggyDepositTx.json new file mode 100644 index 00000000..a5d9d933 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/PeggyDepositTx.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Sender address of deposit request" + }, + { + "Parameter": "receiver", + "Type": "string", + "Description": "Address of receiveer upon deposit" + }, + { + "Parameter": "event_nonce", + "Type": "uint64", + "Description": "The event nonce of WithdrawalClaim event emitted by Ethereum chain upon deposit" + }, + { + "Parameter": "event_height", + "Type": "uint64", + "Description": "The block height of WithdrawalClaim event emitted by Ethereum chain upon deposit" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Amount of tokens being deposited" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of tokens being deposited" + }, + { + "Parameter": "orchestrator_address", + "Type": "string", + "Description": "orchestratorAddress who created batch request" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "" + }, + { + "Parameter": "claim_type", + "Type": "int32", + "Description": "The claimType will be DepoistClaim for Deposits" + }, + { + "Parameter": "tx_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_at", + "Type": "string", + "Description": "" + }, + { + "Parameter": "updated_at", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/PeggyWithdrawalTx.json b/source/json_tables/indexer_new/injective_explorer_rpc/PeggyWithdrawalTx.json new file mode 100644 index 00000000..eb57a758 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/PeggyWithdrawalTx.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Sender address of withdrawal request" + }, + { + "Parameter": "receiver", + "Type": "string", + "Description": "Address of receiveer upon withdrawal" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Amount of tokens being withdrawan" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of tokens being withdrawan" + }, + { + "Parameter": "bridge_fee", + "Type": "string", + "Description": "The bridge fee paid by sender for withdrawal" + }, + { + "Parameter": "outgoing_tx_id", + "Type": "uint64", + "Description": "A auto incremented unique ID representing the withdrawal request" + }, + { + "Parameter": "batch_timeout", + "Type": "uint64", + "Description": "The timestamp after which Batch request will be discarded if not processed already" + }, + { + "Parameter": "batch_nonce", + "Type": "uint64", + "Description": "A auto incremented unique ID representing the Withdrawal Batches" + }, + { + "Parameter": "orchestrator_address", + "Type": "string", + "Description": "orchestratorAddress who created batch request" + }, + { + "Parameter": "event_nonce", + "Type": "uint64", + "Description": "The event nonce of WithdrawalClaim event emitted by Ethereum chain upon batch withdrawal" + }, + { + "Parameter": "event_height", + "Type": "uint64", + "Description": "The block height of WithdrawalClaim event emitted by Ethereum chain upon batch withdrawal" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "" + }, + { + "Parameter": "claim_type", + "Type": "int32", + "Description": "The claimType will be WithdrawalClaim for Batch Withdrawals" + }, + { + "Parameter": "tx_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_at", + "Type": "string", + "Description": "" + }, + { + "Parameter": "updated_at", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Relayer.json b/source/json_tables/indexer_new/injective_explorer_rpc/Relayer.json new file mode 100644 index 00000000..01f634f1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Relayer.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "Relayer identifier" + }, + { + "Parameter": "cta", + "Type": "string", + "Description": "Call to action. A link to the relayer" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/RelayerMarkets.json b/source/json_tables/indexer_new/injective_explorer_rpc/RelayerMarkets.json new file mode 100644 index 00000000..6e68bad8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/RelayerMarkets.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID of the market" + }, + { + "Parameter": "relayers", + "Type": "Relayer array", + "Description": "Relayers list for specified market" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/RelayersRequest.json b/source/json_tables/indexer_new/injective_explorer_rpc/RelayersRequest.json new file mode 100644 index 00000000..1f1d9b23 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/RelayersRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_i_ds", + "Type": "string array", + "Description": "Specify multiple marketIDs to search.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/RelayersResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/RelayersResponse.json new file mode 100644 index 00000000..9fbeb1c5 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/RelayersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "field", + "Type": "RelayerMarkets array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Signature.json b/source/json_tables/indexer_new/injective_explorer_rpc/Signature.json new file mode 100644 index 00000000..8acc824f --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Signature.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "pubkey", + "Type": "string", + "Description": "" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "signature", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/SlashingEvent.json b/source/json_tables/indexer_new/injective_explorer_rpc/SlashingEvent.json new file mode 100644 index 00000000..36a4fba4 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/SlashingEvent.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "block_timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "power", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "reason", + "Type": "string", + "Description": "" + }, + { + "Parameter": "jailed", + "Type": "string", + "Description": "" + }, + { + "Parameter": "missed_blocks", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/StreamBlocksResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/StreamBlocksResponse.json new file mode 100644 index 00000000..1d6f59ec --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/StreamBlocksResponse.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "proposer", + "Type": "string", + "Description": "" + }, + { + "Parameter": "moniker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "parent_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "num_pre_commits", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "num_txs", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "txs", + "Type": "TxDataRPC array", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_unix_timestamp", + "Type": "uint64", + "Description": "Block timestamp in unix milli" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/StreamTxsResponse.json b/source/json_tables/indexer_new/injective_explorer_rpc/StreamTxsResponse.json new file mode 100644 index 00000000..befcc099 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/StreamTxsResponse.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "block_timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "" + }, + { + "Parameter": "messages", + "Type": "string", + "Description": "" + }, + { + "Parameter": "tx_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "error_log", + "Type": "string", + "Description": "Transaction log indicating errors" + }, + { + "Parameter": "code", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "claim_ids", + "Type": "int64 array", + "Description": "peggy bridge claim id, non-zero if tx contains MsgDepositClaim" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/TxData.json b/source/json_tables/indexer_new/injective_explorer_rpc/TxData.json new file mode 100644 index 00000000..cde5fc47 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/TxData.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "block_timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "" + }, + { + "Parameter": "messages", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "tx_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "error_log", + "Type": "string", + "Description": "Transaction log indicating errors" + }, + { + "Parameter": "code", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "tx_msg_types", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "logs", + "Type": "byte array", + "Description": "transaction event logs" + }, + { + "Parameter": "claim_ids", + "Type": "int64 array", + "Description": "peggy bridge claim id, non-zero if tx contains MsgDepositClaim" + }, + { + "Parameter": "signatures", + "Type": "Signature array", + "Description": "" + }, + { + "Parameter": "block_unix_timestamp", + "Type": "uint64", + "Description": "Block timestamp in unix milli" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/TxDataRPC.json b/source/json_tables/indexer_new/injective_explorer_rpc/TxDataRPC.json new file mode 100644 index 00000000..befcc099 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/TxDataRPC.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "block_timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "" + }, + { + "Parameter": "messages", + "Type": "string", + "Description": "" + }, + { + "Parameter": "tx_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "error_log", + "Type": "string", + "Description": "Transaction log indicating errors" + }, + { + "Parameter": "code", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "claim_ids", + "Type": "int64 array", + "Description": "peggy bridge claim id, non-zero if tx contains MsgDepositClaim" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/TxDetailData.json b/source/json_tables/indexer_new/injective_explorer_rpc/TxDetailData.json new file mode 100644 index 00000000..2fa7f2be --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/TxDetailData.json @@ -0,0 +1,107 @@ +[ + { + "Parameter": "id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "block_timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "code", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "info", + "Type": "string", + "Description": "" + }, + { + "Parameter": "gas_wanted", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "gas_used", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "gas_fee", + "Type": "GasFee", + "Description": "" + }, + { + "Parameter": "codespace", + "Type": "string", + "Description": "" + }, + { + "Parameter": "events", + "Type": "Event array", + "Description": "" + }, + { + "Parameter": "tx_type", + "Type": "string", + "Description": "" + }, + { + "Parameter": "messages", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "signatures", + "Type": "Signature array", + "Description": "" + }, + { + "Parameter": "memo", + "Type": "string", + "Description": "" + }, + { + "Parameter": "tx_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "block_unix_timestamp", + "Type": "uint64", + "Description": "Block timestamp in unix milli" + }, + { + "Parameter": "error_log", + "Type": "string", + "Description": "Transaction log indicating errors" + }, + { + "Parameter": "logs", + "Type": "byte array", + "Description": "transaction event logs" + }, + { + "Parameter": "claim_ids", + "Type": "int64 array", + "Description": "peggy bridge claim id, non-zero if tx contains MsgDepositClaim" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/Validator.json b/source/json_tables/indexer_new/injective_explorer_rpc/Validator.json new file mode 100644 index 00000000..a297f034 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/Validator.json @@ -0,0 +1,117 @@ +[ + { + "Parameter": "id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "moniker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "operator_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "consensus_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "jailed", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "status", + "Type": "int32", + "Description": "" + }, + { + "Parameter": "tokens", + "Type": "string", + "Description": "" + }, + { + "Parameter": "delegator_shares", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "ValidatorDescription", + "Description": "" + }, + { + "Parameter": "unbonding_height", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "unbonding_time", + "Type": "string", + "Description": "" + }, + { + "Parameter": "commission_rate", + "Type": "string", + "Description": "" + }, + { + "Parameter": "commission_max_rate", + "Type": "string", + "Description": "" + }, + { + "Parameter": "commission_max_change_rate", + "Type": "string", + "Description": "" + }, + { + "Parameter": "commission_update_time", + "Type": "string", + "Description": "" + }, + { + "Parameter": "proposed", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "signed", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "missed", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "string", + "Description": "" + }, + { + "Parameter": "uptimes", + "Type": "ValidatorUptime array", + "Description": "" + }, + { + "Parameter": "slashing_events", + "Type": "SlashingEvent array", + "Description": "" + }, + { + "Parameter": "uptime_percentage", + "Type": "float64", + "Description": "uptime percentage base on latest 10k block" + }, + { + "Parameter": "image_url", + "Type": "string", + "Description": "URL of the validator logo" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/ValidatorDescription.json b/source/json_tables/indexer_new/injective_explorer_rpc/ValidatorDescription.json new file mode 100644 index 00000000..29f81452 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/ValidatorDescription.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "moniker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "identity", + "Type": "string", + "Description": "" + }, + { + "Parameter": "website", + "Type": "string", + "Description": "" + }, + { + "Parameter": "security_contact", + "Type": "string", + "Description": "" + }, + { + "Parameter": "details", + "Type": "string", + "Description": "" + }, + { + "Parameter": "image_url", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/ValidatorUptime.json b/source/json_tables/indexer_new/injective_explorer_rpc/ValidatorUptime.json new file mode 100644 index 00000000..5caabd72 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/ValidatorUptime.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "status", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/WasmCode.json b/source/json_tables/indexer_new/injective_explorer_rpc/WasmCode.json new file mode 100644 index 00000000..ba0e359c --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/WasmCode.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "code_id", + "Type": "uint64", + "Description": "ID of stored wasmcode, sorted in descending order" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Tx hash of store code transaction" + }, + { + "Parameter": "checksum", + "Type": "Checksum", + "Description": "Checksum of the cosmwasm code" + }, + { + "Parameter": "created_at", + "Type": "uint64", + "Description": "Block time when the code is stored, in millisecond" + }, + { + "Parameter": "contract_type", + "Type": "string", + "Description": "Contract type of the wasm code" + }, + { + "Parameter": "version", + "Type": "string", + "Description": "version string of the wasm code" + }, + { + "Parameter": "permission", + "Type": "ContractPermission", + "Description": "describe instantiate permission" + }, + { + "Parameter": "code_schema", + "Type": "string", + "Description": "code schema preview" + }, + { + "Parameter": "code_view", + "Type": "string", + "Description": "code repo preview, may contain schema folder" + }, + { + "Parameter": "instantiates", + "Type": "uint64", + "Description": "count number of contract instantiation from this code" + }, + { + "Parameter": "creator", + "Type": "string", + "Description": "creator of this code" + }, + { + "Parameter": "code_number", + "Type": "int64", + "Description": "monotonic order of the code stored" + }, + { + "Parameter": "proposal_id", + "Type": "int64", + "Description": "id of the proposal that store this code" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/WasmContract.json b/source/json_tables/indexer_new/injective_explorer_rpc/WasmContract.json new file mode 100644 index 00000000..47a36a9d --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/WasmContract.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "label", + "Type": "string", + "Description": "General name of the contract" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "Address of the contract" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "hash of the instantiate transaction" + }, + { + "Parameter": "creator", + "Type": "string", + "Description": "Address of the contract creator" + }, + { + "Parameter": "executes", + "Type": "uint64", + "Description": "Number of times call to execute contract" + }, + { + "Parameter": "instantiated_at", + "Type": "uint64", + "Description": "Block timestamp that contract was instantiated, in millisecond" + }, + { + "Parameter": "init_message", + "Type": "string", + "Description": "init message when this contract was instantiated" + }, + { + "Parameter": "last_executed_at", + "Type": "uint64", + "Description": "Block timestamp that contract was called, in millisecond" + }, + { + "Parameter": "funds", + "Type": "ContractFund array", + "Description": "Contract funds" + }, + { + "Parameter": "code_id", + "Type": "uint64", + "Description": "Code id of the contract" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "Admin of the contract" + }, + { + "Parameter": "current_migrate_message", + "Type": "string", + "Description": "Latest migrate message of the contract" + }, + { + "Parameter": "contract_number", + "Type": "int64", + "Description": "Monotonic contract number in database" + }, + { + "Parameter": "version", + "Type": "string", + "Description": "Contract version string" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "Contract type" + }, + { + "Parameter": "cw20_metadata", + "Type": "Cw20Metadata", + "Description": "" + }, + { + "Parameter": "proposal_id", + "Type": "int64", + "Description": "id of the proposal that instantiate this contract" + } +] diff --git a/source/json_tables/indexer_new/injective_explorer_rpc/WasmCw20Balance.json b/source/json_tables/indexer_new/injective_explorer_rpc/WasmCw20Balance.json new file mode 100644 index 00000000..036fe356 --- /dev/null +++ b/source/json_tables/indexer_new/injective_explorer_rpc/WasmCw20Balance.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Address of CW20 contract" + }, + { + "Parameter": "account", + "Type": "string", + "Description": "Account address" + }, + { + "Parameter": "balance", + "Type": "string", + "Description": "Account balance" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "update timestamp in milisecond" + }, + { + "Parameter": "cw20_metadata", + "Type": "Cw20Metadata", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_insurance_rpc/FundRequest.json b/source/json_tables/indexer_new/injective_insurance_rpc/FundRequest.json new file mode 100644 index 00000000..6019f04f --- /dev/null +++ b/source/json_tables/indexer_new/injective_insurance_rpc/FundRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "denom of insurance fund", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_insurance_rpc/FundResponse.json b/source/json_tables/indexer_new/injective_insurance_rpc/FundResponse.json new file mode 100644 index 00000000..cc7144f6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_insurance_rpc/FundResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "fund", + "Type": "InsuranceFund", + "Description": "The insurance fund corresponding to the provided token denom" + } +] diff --git a/source/json_tables/indexer_new/injective_insurance_rpc/FundsResponse.json b/source/json_tables/indexer_new/injective_insurance_rpc/FundsResponse.json new file mode 100644 index 00000000..79dc4111 --- /dev/null +++ b/source/json_tables/indexer_new/injective_insurance_rpc/FundsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "funds", + "Type": "InsuranceFund array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_insurance_rpc/InsuranceFund.json b/source/json_tables/indexer_new/injective_insurance_rpc/InsuranceFund.json new file mode 100644 index 00000000..95e3c8fb --- /dev/null +++ b/source/json_tables/indexer_new/injective_insurance_rpc/InsuranceFund.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "market_ticker", + "Type": "string", + "Description": "Ticker of the derivative market." + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "deposit_denom", + "Type": "string", + "Description": "Coin denom used for the underwriting of the insurance fund." + }, + { + "Parameter": "pool_token_denom", + "Type": "string", + "Description": "Pool token denom" + }, + { + "Parameter": "redemption_notice_period_duration", + "Type": "int64", + "Description": "Redemption notice period duration in seconds." + }, + { + "Parameter": "balance", + "Type": "string", + "Description": "" + }, + { + "Parameter": "total_share", + "Type": "string", + "Description": "" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_type", + "Type": "string", + "Description": "Oracle Type" + }, + { + "Parameter": "expiry", + "Type": "int64", + "Description": "Defines the expiry, if any" + }, + { + "Parameter": "deposit_token_meta", + "Type": "TokenMeta", + "Description": "Token metadata for the deposit asset" + } +] diff --git a/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionSchedule.json b/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionSchedule.json new file mode 100644 index 00000000..30b4fb54 --- /dev/null +++ b/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionSchedule.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "redemption_id", + "Type": "uint64", + "Description": "Redemption ID." + }, + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the redemption. Either pending or disbursed." + }, + { + "Parameter": "redeemer", + "Type": "string", + "Description": "Account address of the redemption owner" + }, + { + "Parameter": "claimable_redemption_time", + "Type": "int64", + "Description": "Claimable redemption time in seconds" + }, + { + "Parameter": "redemption_amount", + "Type": "string", + "Description": "Amount of pool tokens being redeemed." + }, + { + "Parameter": "redemption_denom", + "Type": "string", + "Description": "Pool token denom being redeemed." + }, + { + "Parameter": "requested_at", + "Type": "int64", + "Description": "Redemption request time in unix milliseconds." + }, + { + "Parameter": "disbursed_amount", + "Type": "string", + "Description": "Amount of quote tokens disbursed" + }, + { + "Parameter": "disbursed_denom", + "Type": "string", + "Description": "Denom of the quote tokens disbursed" + }, + { + "Parameter": "disbursed_at", + "Type": "int64", + "Description": "Redemption disbursement time in unix milliseconds." + } +] diff --git a/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionsRequest.json b/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionsRequest.json new file mode 100644 index 00000000..ba2cb231 --- /dev/null +++ b/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionsRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "redeemer", + "Type": "string", + "Description": "Account address of the redemption owner", + "Required": "Yes" + }, + { + "Parameter": "redemption_denom", + "Type": "string", + "Description": "Denom of the insurance pool token.", + "Required": "Yes" + }, + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the redemption. Either pending or disbursed.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionsResponse.json b/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionsResponse.json new file mode 100644 index 00000000..3056be49 --- /dev/null +++ b/source/json_tables/indexer_new/injective_insurance_rpc/RedemptionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "redemption_schedules", + "Type": "RedemptionSchedule array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_insurance_rpc/TokenMeta.json b/source/json_tables/indexer_new/injective_insurance_rpc/TokenMeta.json new file mode 100644 index 00000000..0a644cab --- /dev/null +++ b/source/json_tables/indexer_new/injective_insurance_rpc/TokenMeta.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "Token full name" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "Token contract address (native or not)" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "Token symbol short name" + }, + { + "Parameter": "logo", + "Type": "string", + "Description": "URL to the logo image" + }, + { + "Parameter": "decimals", + "Type": "int32", + "Description": "Token decimals" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Token metadata fetched timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_megavault_rpc/GetVaultResponse.json b/source/json_tables/indexer_new/injective_megavault_rpc/GetVaultResponse.json new file mode 100644 index 00000000..e92b9f60 --- /dev/null +++ b/source/json_tables/indexer_new/injective_megavault_rpc/GetVaultResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "vault", + "Type": "Vault", + "Description": "The vault" + } +] diff --git a/source/json_tables/indexer_new/injective_megavault_rpc/Operator.json b/source/json_tables/indexer_new/injective_megavault_rpc/Operator.json new file mode 100644 index 00000000..e6ab2e69 --- /dev/null +++ b/source/json_tables/indexer_new/injective_megavault_rpc/Operator.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "Operator address" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "Contract name" + }, + { + "Parameter": "updated_height", + "Type": "int64", + "Description": "Block height when the operator was updated." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "UpdatedAt timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_megavault_rpc/Vault.json b/source/json_tables/indexer_new/injective_megavault_rpc/Vault.json new file mode 100644 index 00000000..a6fccd4a --- /dev/null +++ b/source/json_tables/indexer_new/injective_megavault_rpc/Vault.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Contract address" + }, + { + "Parameter": "contract_name", + "Type": "string", + "Description": "Contract name" + }, + { + "Parameter": "contract_version", + "Type": "string", + "Description": "Contract version" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "Admin" + }, + { + "Parameter": "lp_denom", + "Type": "string", + "Description": "LP denom" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Quote denom" + }, + { + "Parameter": "total_amount", + "Type": "string", + "Description": "Total amount" + }, + { + "Parameter": "total_lp_amount", + "Type": "string", + "Description": "Total amount of LP token" + }, + { + "Parameter": "operators", + "Type": "Operator array", + "Description": "Operators" + }, + { + "Parameter": "created_height", + "Type": "int64", + "Description": "Block height when the vault was created." + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "UpdatedAt timestamp in UNIX millis." + }, + { + "Parameter": "updated_height", + "Type": "int64", + "Description": "Block height when the vault was updated." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "UpdatedAt timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_meta_rpc/InfoRequest.json b/source/json_tables/indexer_new/injective_meta_rpc/InfoRequest.json new file mode 100644 index 00000000..e988b752 --- /dev/null +++ b/source/json_tables/indexer_new/injective_meta_rpc/InfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Provide current system UNIX timestamp in millis", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_meta_rpc/InfoResponse.json b/source/json_tables/indexer_new/injective_meta_rpc/InfoResponse.json new file mode 100644 index 00000000..ada1c94f --- /dev/null +++ b/source/json_tables/indexer_new/injective_meta_rpc/InfoResponse.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "The original timestamp value in millis." + }, + { + "Parameter": "server_time", + "Type": "int64", + "Description": "UNIX time on the server in millis." + }, + { + "Parameter": "version", + "Type": "string", + "Description": "injective-exchange code version." + }, + { + "Parameter": "build", + "Type": "map[string]string", + "Description": "Additional build meta info." + }, + { + "Parameter": "region", + "Type": "string", + "Description": "Server's location region" + } +] diff --git a/source/json_tables/indexer_new/injective_meta_rpc/StreamKeepaliveResponse.json b/source/json_tables/indexer_new/injective_meta_rpc/StreamKeepaliveResponse.json new file mode 100644 index 00000000..68292ee7 --- /dev/null +++ b/source/json_tables/indexer_new/injective_meta_rpc/StreamKeepaliveResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "event", + "Type": "string", + "Description": "Server event" + }, + { + "Parameter": "new_endpoint", + "Type": "string", + "Description": "New conection endpoint for the gRPC API" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataElement.json b/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataElement.json new file mode 100644 index 00000000..716e1d6e --- /dev/null +++ b/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataElement.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "ethereum_address", + "Type": "string", + "Description": "Token's Ethereum address, not all token have this information" + }, + { + "Parameter": "coingecko_id", + "Type": "string", + "Description": "Token's CoinGecko id for price references" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "Token's denom on injective chain" + }, + { + "Parameter": "name", + "Type": "string", + "Description": "Token name" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "Token symbol" + }, + { + "Parameter": "decimals", + "Type": "int32", + "Description": "Number of decimal places used to represent the token's smallest unit" + }, + { + "Parameter": "logo", + "Type": "string", + "Description": "Token logo URL" + } +] diff --git a/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataRequest.json b/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataRequest.json new file mode 100644 index 00000000..ef252b77 --- /dev/null +++ b/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denoms", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataResponse.json b/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataResponse.json new file mode 100644 index 00000000..3e6062f6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_meta_rpc/TokenMetadataResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "tokens", + "Type": "TokenMetadataElement array", + "Description": "tokens and their metadata list" + } +] diff --git a/source/json_tables/indexer_new/injective_meta_rpc/VersionResponse.json b/source/json_tables/indexer_new/injective_meta_rpc/VersionResponse.json new file mode 100644 index 00000000..62e67a5a --- /dev/null +++ b/source/json_tables/indexer_new/injective_meta_rpc/VersionResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "version", + "Type": "string", + "Description": "injective-exchange code version." + }, + { + "Parameter": "build", + "Type": "map[string]string", + "Description": "Additional build meta info." + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/Oracle.json b/source/json_tables/indexer_new/injective_oracle_rpc/Oracle.json new file mode 100644 index 00000000..91a14cdc --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/Oracle.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "The symbol of the oracle asset." + }, + { + "Parameter": "base_symbol", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "quote_symbol", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_type", + "Type": "string", + "Description": "Oracle Type" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "The price of the oracle asset" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/OracleListResponse.json b/source/json_tables/indexer_new/injective_oracle_rpc/OracleListResponse.json new file mode 100644 index 00000000..84dae079 --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/OracleListResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "oracles", + "Type": "Oracle array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/PricePayloadV2.json b/source/json_tables/indexer_new/injective_oracle_rpc/PricePayloadV2.json new file mode 100644 index 00000000..6a3a90bc --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/PricePayloadV2.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "base_symbol", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "quote_symbol", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_type", + "Type": "string", + "Description": "Oracle Type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "OracleScaleFactor" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/PriceRequest.json b/source/json_tables/indexer_new/injective_oracle_rpc/PriceRequest.json new file mode 100644 index 00000000..4abf3407 --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/PriceRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "base_symbol", + "Type": "string", + "Description": "Oracle base currency", + "Required": "Yes" + }, + { + "Parameter": "quote_symbol", + "Type": "string", + "Description": "Oracle quote currency", + "Required": "Yes" + }, + { + "Parameter": "oracle_type", + "Type": "string", + "Description": "Oracle Type", + "Required": "Yes" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "OracleScaleFactor", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/PriceResponse.json b/source/json_tables/indexer_new/injective_oracle_rpc/PriceResponse.json new file mode 100644 index 00000000..03e24605 --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/PriceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "The price of the oracle asset" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Request.json b/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Request.json new file mode 100644 index 00000000..0d7bb5fe --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Request.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "filters", + "Type": "PricePayloadV2 array", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Response.json b/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Response.json new file mode 100644 index 00000000..6dda6060 --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Response.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "prices", + "Type": "PriceV2Result array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Result.json b/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Result.json new file mode 100644 index 00000000..8fd6398d --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/PriceV2Result.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "base_symbol", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "quote_symbol", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_type", + "Type": "string", + "Description": "Oracle Type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "OracleScaleFactor" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "The price of the oracle asset" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "marketID" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesByMarketsRequest.json b/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesByMarketsRequest.json new file mode 100644 index 00000000..db56e1d6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesByMarketsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "marketIDs to stream price for, empty to listen for all prices", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesByMarketsResponse.json b/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesByMarketsResponse.json new file mode 100644 index 00000000..df121cfd --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesByMarketsResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "The price of the oracle asset" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "marketID that the price has been updated" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesRequest.json b/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesRequest.json new file mode 100644 index 00000000..2763a521 --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "base_symbol", + "Type": "string", + "Description": "Oracle base currency", + "Required": "Yes" + }, + { + "Parameter": "quote_symbol", + "Type": "string", + "Description": "Oracle quote currency", + "Required": "Yes" + }, + { + "Parameter": "oracle_type", + "Type": "string", + "Description": "Oracle Type", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesResponse.json b/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesResponse.json new file mode 100644 index 00000000..a380b8c0 --- /dev/null +++ b/source/json_tables/indexer_new/injective_oracle_rpc/StreamPricesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "The price of the oracle asset" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioBalancesRequest.json b/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioBalancesRequest.json new file mode 100644 index 00000000..cdecbc83 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioBalancesRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "usd", + "Type": "bool", + "Description": "Whether to return USD values for the balances", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioBalancesResponse.json b/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioBalancesResponse.json new file mode 100644 index 00000000..a31d6f43 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioBalancesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "portfolio", + "Type": "PortfolioBalances", + "Description": "The portfolio balances of this account" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioRequest.json b/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioRequest.json new file mode 100644 index 00000000..bfd7f33d --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioResponse.json b/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioResponse.json new file mode 100644 index 00000000..a9407cd0 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/AccountPortfolioResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "portfolio", + "Type": "Portfolio", + "Description": "The portfolio of this account" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/Coin.json b/source/json_tables/indexer_new/injective_portfolio_rpc/Coin.json new file mode 100644 index 00000000..8fa4b17b --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/Coin.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of the coin" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "usd_value", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/DerivativePosition.json b/source/json_tables/indexer_new/injective_portfolio_rpc/DerivativePosition.json new file mode 100644 index 00000000..d77bf07b --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/DerivativePosition.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker of the derivative market" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Derivative Market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that the position belongs to" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Direction of the position" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the position" + }, + { + "Parameter": "entry_price", + "Type": "string", + "Description": "Price of the position" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "Margin of the position" + }, + { + "Parameter": "liquidation_price", + "Type": "string", + "Description": "LiquidationPrice of the position" + }, + { + "Parameter": "mark_price", + "Type": "string", + "Description": "MarkPrice of the position" + }, + { + "Parameter": "aggregate_reduce_only_quantity", + "Type": "string", + "Description": "Aggregate Quantity of the Reduce Only orders associated with the position" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Position updated timestamp in UNIX millis." + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Position created timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/Holder.json b/source/json_tables/indexer_new/injective_portfolio_rpc/Holder.json new file mode 100644 index 00000000..59a98497 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/Holder.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address for the holder" + }, + { + "Parameter": "balance", + "Type": "string", + "Description": "The balance of the holder" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/Portfolio.json b/source/json_tables/indexer_new/injective_portfolio_rpc/Portfolio.json new file mode 100644 index 00000000..728ea9d8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/Portfolio.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "The account's portfolio address" + }, + { + "Parameter": "bank_balances", + "Type": "Coin array", + "Description": "Account available bank balances" + }, + { + "Parameter": "subaccounts", + "Type": "SubaccountBalanceV2 array", + "Description": "Subaccounts list" + }, + { + "Parameter": "positions_with_upnl", + "Type": "PositionsWithUPNL array", + "Description": "All positions for all subaccounts, with unrealized PNL" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/PortfolioBalances.json b/source/json_tables/indexer_new/injective_portfolio_rpc/PortfolioBalances.json new file mode 100644 index 00000000..5cd58135 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/PortfolioBalances.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "The account's portfolio address" + }, + { + "Parameter": "bank_balances", + "Type": "Coin array", + "Description": "Account available bank balances" + }, + { + "Parameter": "subaccounts", + "Type": "SubaccountBalanceV2 array", + "Description": "Subaccounts list" + }, + { + "Parameter": "total_usd", + "Type": "string", + "Description": "USD value of the portfolio" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/PositionsWithUPNL.json b/source/json_tables/indexer_new/injective_portfolio_rpc/PositionsWithUPNL.json new file mode 100644 index 00000000..e2136954 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/PositionsWithUPNL.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "position", + "Type": "DerivativePosition", + "Description": "" + }, + { + "Parameter": "unrealized_pnl", + "Type": "string", + "Description": "Unrealized PNL" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/StreamAccountPortfolioRequest.json b/source/json_tables/indexer_new/injective_portfolio_rpc/StreamAccountPortfolioRequest.json new file mode 100644 index 00000000..085f7771 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/StreamAccountPortfolioRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "The account's portfolio address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "Related subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/StreamAccountPortfolioResponse.json b/source/json_tables/indexer_new/injective_portfolio_rpc/StreamAccountPortfolioResponse.json new file mode 100644 index 00000000..801a611e --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/StreamAccountPortfolioResponse.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "type", + "Type": "string", + "Description": "type of portfolio entry" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "denom of portfolio entry" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "amount of portfolio entry" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount id of portfolio entry" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/SubaccountBalanceV2.json b/source/json_tables/indexer_new/injective_portfolio_rpc/SubaccountBalanceV2.json new file mode 100644 index 00000000..87f12255 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/SubaccountBalanceV2.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "Related subaccount ID" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "Coin denom on the chain." + }, + { + "Parameter": "deposit", + "Type": "SubaccountDeposit", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/SubaccountDeposit.json b/source/json_tables/indexer_new/injective_portfolio_rpc/SubaccountDeposit.json new file mode 100644 index 00000000..6f45f42a --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/SubaccountDeposit.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "total_balance", + "Type": "string", + "Description": "" + }, + { + "Parameter": "available_balance", + "Type": "string", + "Description": "" + }, + { + "Parameter": "total_balance_usd", + "Type": "string", + "Description": "" + }, + { + "Parameter": "available_balance_usd", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/TokenHoldersRequest.json b/source/json_tables/indexer_new/injective_portfolio_rpc/TokenHoldersRequest.json new file mode 100644 index 00000000..9870bc98 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/TokenHoldersRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of the token", + "Required": "Yes" + }, + { + "Parameter": "cursor", + "Type": "string", + "Description": "Cursor for pagination", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_portfolio_rpc/TokenHoldersResponse.json b/source/json_tables/indexer_new/injective_portfolio_rpc/TokenHoldersResponse.json new file mode 100644 index 00000000..532ecdd6 --- /dev/null +++ b/source/json_tables/indexer_new/injective_portfolio_rpc/TokenHoldersResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "holders", + "Type": "Holder array", + "Description": "" + }, + { + "Parameter": "next_cursors", + "Type": "string array", + "Description": "Next cursors for pagination" + } +] diff --git a/source/json_tables/indexer_new/injective_referral_rpc/GetInviteeDetailsRequest.json b/source/json_tables/indexer_new/injective_referral_rpc/GetInviteeDetailsRequest.json new file mode 100644 index 00000000..b70194ae --- /dev/null +++ b/source/json_tables/indexer_new/injective_referral_rpc/GetInviteeDetailsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "invitee_address", + "Type": "string", + "Description": "Address of the invitee", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_referral_rpc/GetInviteeDetailsResponse.json b/source/json_tables/indexer_new/injective_referral_rpc/GetInviteeDetailsResponse.json new file mode 100644 index 00000000..e58f1a09 --- /dev/null +++ b/source/json_tables/indexer_new/injective_referral_rpc/GetInviteeDetailsResponse.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "referrer", + "Type": "string", + "Description": "Address of the referrer" + }, + { + "Parameter": "used_code", + "Type": "string", + "Description": "Referral code used" + }, + { + "Parameter": "trading_volume", + "Type": "string", + "Description": "Total trading volume" + }, + { + "Parameter": "joined_at", + "Type": "string", + "Description": "Join date in ISO 8601 format" + }, + { + "Parameter": "active", + "Type": "bool", + "Description": "Whether the referral is still active" + } +] diff --git a/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerByCodeRequest.json b/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerByCodeRequest.json new file mode 100644 index 00000000..3c730f41 --- /dev/null +++ b/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerByCodeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "referral_code", + "Type": "string", + "Description": "Referral code to look up", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerByCodeResponse.json b/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerByCodeResponse.json new file mode 100644 index 00000000..1c034498 --- /dev/null +++ b/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerByCodeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "referrer_address", + "Type": "string", + "Description": "Address of the referrer" + } +] diff --git a/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerDetailsRequest.json b/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerDetailsRequest.json new file mode 100644 index 00000000..dd02be8e --- /dev/null +++ b/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerDetailsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "referrer_address", + "Type": "string", + "Description": "Address of the referrer", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerDetailsResponse.json b/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerDetailsResponse.json new file mode 100644 index 00000000..4bfe857c --- /dev/null +++ b/source/json_tables/indexer_new/injective_referral_rpc/GetReferrerDetailsResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "invitees", + "Type": "ReferralInvitee array", + "Description": "List of invitees" + }, + { + "Parameter": "total_commission", + "Type": "string", + "Description": "Total commission earned" + }, + { + "Parameter": "total_trading_volume", + "Type": "string", + "Description": "Total trading volume" + }, + { + "Parameter": "referrer_code", + "Type": "string", + "Description": "Referrer code" + } +] diff --git a/source/json_tables/indexer_new/injective_referral_rpc/ReferralInvitee.json b/source/json_tables/indexer_new/injective_referral_rpc/ReferralInvitee.json new file mode 100644 index 00000000..a6c8f56e --- /dev/null +++ b/source/json_tables/indexer_new/injective_referral_rpc/ReferralInvitee.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "Address of the invitee" + }, + { + "Parameter": "commission", + "Type": "string", + "Description": "Commission earned from this invitee" + }, + { + "Parameter": "trading_volume", + "Type": "string", + "Description": "Trading volume of this invitee" + }, + { + "Parameter": "join_date", + "Type": "string", + "Description": "Join date in ISO 8601 format" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwap.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwap.json new file mode 100644 index 00000000..f28531c8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwap.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "executor of the swap" + }, + { + "Parameter": "route", + "Type": "string", + "Description": "swap route" + }, + { + "Parameter": "source_coin", + "Type": "Coin", + "Description": "source coin" + }, + { + "Parameter": "dest_coin", + "Type": "Coin", + "Description": "destination received coin" + }, + { + "Parameter": "fees", + "Type": "Coin array", + "Description": "fees of each steps in route" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "contract address that executes to make this swap" + }, + { + "Parameter": "index_by_sender", + "Type": "int32", + "Description": "Numerical index by sender to use in pagination from_number and to_number" + }, + { + "Parameter": "index_by_sender_contract", + "Type": "int32", + "Description": "Numerical index by sender + acontract to use in pagination from_number and to_number, that support contract filter" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "transaction hash of the swap" + }, + { + "Parameter": "executed_at", + "Type": "int64", + "Description": "transaction timestamp of the swap" + }, + { + "Parameter": "refund_amount", + "Type": "string", + "Description": "Refunded amount of the swap" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwapHistoryRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwapHistoryRequest.json new file mode 100644 index 00000000..8c1c1572 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwapHistoryRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "sender of the atomic swap", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "atomic swap contract address to filter", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "int32", + "Description": "skip some swaps", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "limit number of swaps returned by this API", + "Required": "Yes" + }, + { + "Parameter": "from_number", + "Type": "int32", + "Description": "lowerbound of atomic swap index", + "Required": "Yes" + }, + { + "Parameter": "to_number", + "Type": "int32", + "Description": "upperbound of atomic swap index", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwapHistoryResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwapHistoryResponse.json new file mode 100644 index 00000000..db02d33a --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/AtomicSwapHistoryResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "paging", + "Type": "Paging", + "Description": "Paging indicates total number of records with this filter" + }, + { + "Parameter": "data", + "Type": "AtomicSwap array", + "Description": "swap data" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/Coin.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/Coin.json new file mode 100644 index 00000000..8fa4b17b --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/Coin.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "Denom of the coin" + }, + { + "Parameter": "amount", + "Type": "string", + "Description": "" + }, + { + "Parameter": "usd_value", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketRequest.json new file mode 100644 index 00000000..3d8c5562 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market we want to fetch", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketResponse.json new file mode 100644 index 00000000..9d76fc1d --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "SpotMarketInfo", + "Description": "Info about particular spot market" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketsRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketsRequest.json new file mode 100644 index 00000000..36be1561 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "market_status", + "Type": "string", + "Description": "Filter by market status", + "Required": "Yes" + }, + { + "Parameter": "base_denom", + "Type": "string", + "Description": "Filter by the Coin denomination of the base currency", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Filter by the Coin denomination of the quote currency", + "Required": "Yes" + }, + { + "Parameter": "market_statuses", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketsResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketsResponse.json new file mode 100644 index 00000000..9ba1b068 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/MarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "SpotMarketInfo array", + "Description": "Spot Markets list" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookLevelUpdates.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookLevelUpdates.json new file mode 100644 index 00000000..ad0f388b --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookLevelUpdates.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market's ID" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "orderbook update sequence" + }, + { + "Parameter": "buys", + "Type": "PriceLevelUpdate array", + "Description": "buy levels" + }, + { + "Parameter": "sells", + "Type": "PriceLevelUpdate array", + "Description": "sell levels" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "updates timestamp" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookV2Request.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookV2Request.json new file mode 100644 index 00000000..9fa98542 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookV2Request.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "depth", + "Type": "int32", + "Description": "Depth of the orderbook", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookV2Response.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookV2Response.json new file mode 100644 index 00000000..cee6be0e --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbookV2Response.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orderbook", + "Type": "SpotLimitOrderbookV2", + "Description": "Orderbook of a particular spot market" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbooksV2Request.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbooksV2Request.json new file mode 100644 index 00000000..26ae06de --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbooksV2Request.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets", + "Required": "Yes" + }, + { + "Parameter": "depth", + "Type": "int32", + "Description": "Depth of the orderbook", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbooksV2Response.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbooksV2Response.json new file mode 100644 index 00000000..ed960dde --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrderbooksV2Response.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orderbooks", + "Type": "SingleSpotLimitOrderbookV2 array", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersHistoryRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersHistoryRequest.json new file mode 100644 index 00000000..bc4789fd --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersHistoryRequest.json @@ -0,0 +1,86 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount ID to filter orders for specific subaccount", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID to filter orders for specific market", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + }, + { + "Parameter": "order_types", + "Type": "string array", + "Description": "filter by order types", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "order side filter", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "Search for orders which createdAt >= startTime, time in millisecond", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "Search for orders which createdAt <= endTime, time in millisecond", + "Required": "Yes" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Filter by order state", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "TradeId of the order we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "active_markets_only", + "Type": "bool", + "Description": "Return only orders for active markets", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersHistoryResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersHistoryResponse.json new file mode 100644 index 00000000..75b66d28 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersHistoryResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "orders", + "Type": "SpotOrderHistory array", + "Description": "List of history spot orders" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersRequest.json new file mode 100644 index 00000000..39c8d070 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersRequest.json @@ -0,0 +1,74 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "Look for specific order side", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "Look for specific subaccountId of an order", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "include_inactive", + "Type": "bool", + "Description": "Should include inactive orders", + "Required": "Yes" + }, + { + "Parameter": "subaccount_total_orders", + "Type": "bool", + "Description": "Choose to return subaccount total orders", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "TradeId of the order we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersResponse.json new file mode 100644 index 00000000..9154b736 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/OrdersResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "orders", + "Type": "SpotLimitOrder array", + "Description": "" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/Paging.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/Paging.json new file mode 100644 index 00000000..d11d26dc --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/Paging.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "total", + "Type": "int64", + "Description": "total number of txs saved in database" + }, + { + "Parameter": "from", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "to", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "count_by_subaccount", + "Type": "int64", + "Description": "count entries by subaccount, serving some places on helix" + }, + { + "Parameter": "next", + "Type": "string array", + "Description": "array of tokens to navigate to the next pages" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/PriceLevel.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/PriceLevel.json new file mode 100644 index 00000000..d7ecf738 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/PriceLevel.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "Price number of the price level." + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the price level." + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Price level last updated timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/PriceLevelUpdate.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/PriceLevelUpdate.json new file mode 100644 index 00000000..cc8351f5 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/PriceLevelUpdate.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "price", + "Type": "string", + "Description": "Price number of the price level." + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the price level." + }, + { + "Parameter": "is_active", + "Type": "bool", + "Description": "Price level status." + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Price level last updated timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SingleSpotLimitOrderbookV2.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SingleSpotLimitOrderbookV2.json new file mode 100644 index 00000000..3195ea51 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SingleSpotLimitOrderbookV2.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market's ID" + }, + { + "Parameter": "orderbook", + "Type": "SpotLimitOrderbookV2", + "Description": "Orderbook of the market" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotLimitOrder.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotLimitOrder.json new file mode 100644 index 00000000..9b70d7bf --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotLimitOrder.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Spot Market ID is keccak265(baseDenom + quoteDenom)" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Price of the order" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the order" + }, + { + "Parameter": "unfilled_quantity", + "Type": "string", + "Description": "The amount of the quantity remaining unfilled" + }, + { + "Parameter": "trigger_price", + "Type": "string", + "Description": "Trigger price is the trigger price used by stop/take orders. 0 if the trigger price is not set." + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Order state" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction Hash where order is created. Not all orders have this field" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotLimitOrderbookV2.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotLimitOrderbookV2.json new file mode 100644 index 00000000..2a3224bc --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotLimitOrderbookV2.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "buys", + "Type": "PriceLevel array", + "Description": "Array of price levels for buys" + }, + { + "Parameter": "sells", + "Type": "PriceLevel array", + "Description": "Array of price levels for sells" + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "market orderbook sequence" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Last update timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotMarketInfo.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotMarketInfo.json new file mode 100644 index 00000000..324b2ac1 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotMarketInfo.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "SpotMarket ID is keccak265(baseDenom || quoteDenom)" + }, + { + "Parameter": "market_status", + "Type": "string", + "Description": "The status of the market" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote asset." + }, + { + "Parameter": "base_denom", + "Type": "string", + "Description": "Coin denom used for the base asset." + }, + { + "Parameter": "base_token_meta", + "Type": "TokenMeta", + "Description": "Token metadata for base asset" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Coin denom used for the quote asset." + }, + { + "Parameter": "quote_token_meta", + "Type": "TokenMeta", + "Description": "Token metadata for quote asset" + }, + { + "Parameter": "maker_fee_rate", + "Type": "string", + "Description": "Defines the fee percentage makers pay when trading (in quote asset)" + }, + { + "Parameter": "taker_fee_rate", + "Type": "string", + "Description": "Defines the fee percentage takers pay when trading (in quote asset)" + }, + { + "Parameter": "service_provider_fee", + "Type": "string", + "Description": "Percentage of the transaction fee shared with the service provider" + }, + { + "Parameter": "min_price_tick_size", + "Type": "string", + "Description": "Defines the minimum required tick size for the order's price" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "string", + "Description": "Defines the minimum required tick size for the order's quantity" + }, + { + "Parameter": "min_notional", + "Type": "string", + "Description": "Minimum notional value for the market" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotOrderHistory.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotOrderHistory.json new file mode 100644 index 00000000..0a476fe8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotOrderHistory.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Hash of the order" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Spot Market ID is keccak265(baseDenom + quoteDenom)" + }, + { + "Parameter": "is_active", + "Type": "bool", + "Description": "active state of the order" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that this order belongs to" + }, + { + "Parameter": "execution_type", + "Type": "string", + "Description": "The execution type" + }, + { + "Parameter": "order_type", + "Type": "string", + "Description": "The side of the order" + }, + { + "Parameter": "price", + "Type": "string", + "Description": "Price of the order" + }, + { + "Parameter": "trigger_price", + "Type": "string", + "Description": "Trigger price" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "Quantity of the order" + }, + { + "Parameter": "filled_quantity", + "Type": "string", + "Description": "Filled amount" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Order state" + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "Order committed timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Order updated timestamp in UNIX millis." + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Order direction (order side)" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction Hash where order is created. Not all orders have this field" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotTrade.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotTrade.json new file mode 100644 index 00000000..c11ed996 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SpotTrade.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "Maker order hash." + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "The subaccountId that executed the trade" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "The ID of the market that this trade is in" + }, + { + "Parameter": "trade_execution_type", + "Type": "string", + "Description": "The execution type of the trade" + }, + { + "Parameter": "trade_direction", + "Type": "string", + "Description": "The direction the trade" + }, + { + "Parameter": "price", + "Type": "PriceLevel", + "Description": "Price level at which trade has been executed" + }, + { + "Parameter": "fee", + "Type": "string", + "Description": "The fee associated with the trade (quote asset denom)" + }, + { + "Parameter": "executed_at", + "Type": "int64", + "Description": "Timestamp of trade execution in UNIX millis" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "A unique string that helps differentiate between trades" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Trade's execution side, marker/taker" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Custom client order ID" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamMarketsRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamMarketsRequest.json new file mode 100644 index 00000000..f339d8bd --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamMarketsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "List of market IDs for updates streaming, empty means 'ALL' spot markets", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamMarketsResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamMarketsResponse.json new file mode 100644 index 00000000..a1d33aed --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamMarketsResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market", + "Type": "SpotMarketInfo", + "Description": "Info about particular spot market" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookUpdateRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookUpdateRequest.json new file mode 100644 index 00000000..7423de82 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookUpdateRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "List of market IDs for orderbook streaming, empty means 'ALL' spot markets", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookUpdateResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookUpdateResponse.json new file mode 100644 index 00000000..8659e1f2 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookUpdateResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "orderbook_level_updates", + "Type": "OrderbookLevelUpdates", + "Description": "Orderbook level updates of a Spot Market" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookV2Request.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookV2Request.json new file mode 100644 index 00000000..7423de82 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookV2Request.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "List of market IDs for orderbook streaming, empty means 'ALL' spot markets", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookV2Response.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookV2Response.json new file mode 100644 index 00000000..17c72c8a --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrderbookV2Response.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "orderbook", + "Type": "SpotLimitOrderbookV2", + "Description": "Orderbook of a Spot Market" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersHistoryRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersHistoryRequest.json new file mode 100644 index 00000000..816a846a --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersHistoryRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount ID to filter orders for specific subaccount", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID to filter orders for specific market", + "Required": "Yes" + }, + { + "Parameter": "order_types", + "Type": "string array", + "Description": "filter by order types", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "order side filter", + "Required": "Yes" + }, + { + "Parameter": "state", + "Type": "string", + "Description": "Filter by order state", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersHistoryResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersHistoryResponse.json new file mode 100644 index 00000000..7e9ba648 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersHistoryResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order", + "Type": "SpotOrderHistory", + "Description": "Updated order" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersRequest.json new file mode 100644 index 00000000..39c8d070 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersRequest.json @@ -0,0 +1,74 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "order_side", + "Type": "string", + "Description": "Look for specific order side", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "Look for specific subaccountId of an order", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "include_inactive", + "Type": "bool", + "Description": "Should include inactive orders", + "Required": "Yes" + }, + { + "Parameter": "subaccount_total_orders", + "Type": "bool", + "Description": "Choose to return subaccount total orders", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "TradeId of the order we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersResponse.json new file mode 100644 index 00000000..7d4f34a8 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamOrdersResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order", + "Type": "SpotLimitOrder", + "Description": "Updated market order" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Order update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesRequest.json new file mode 100644 index 00000000..7b3864f0 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesRequest.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Filter by execution side of the trade", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction the trade", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the item result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Filter by the tradeId of the trade", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesResponse.json new file mode 100644 index 00000000..7640b4f7 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "trade", + "Type": "SpotTrade", + "Description": "New spot market trade" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Executed trades update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesV2Request.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesV2Request.json new file mode 100644 index 00000000..7b3864f0 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesV2Request.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Filter by execution side of the trade", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction the trade", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the item result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Filter by the tradeId of the trade", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesV2Response.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesV2Response.json new file mode 100644 index 00000000..7640b4f7 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/StreamTradesV2Response.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "trade", + "Type": "SpotTrade", + "Description": "New spot market trade" + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Executed trades update type" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Operation timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountOrdersListRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountOrdersListRequest.json new file mode 100644 index 00000000..e135b7cd --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountOrdersListRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount ID to filter orders for specific subaccount", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID to filter orders for specific market", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountOrdersListResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountOrdersListResponse.json new file mode 100644 index 00000000..9154b736 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountOrdersListResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "orders", + "Type": "SpotLimitOrder array", + "Description": "" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountTradesListRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountTradesListRequest.json new file mode 100644 index 00000000..a53db4bd --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountTradesListRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Filter trades by market ID", + "Required": "Yes" + }, + { + "Parameter": "execution_type", + "Type": "string", + "Description": "Filter by execution type of trades", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction trades", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountTradesListResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountTradesListResponse.json new file mode 100644 index 00000000..6e219552 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/SubaccountTradesListResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "trades", + "Type": "SpotTrade array", + "Description": "List of spot market trades" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/TokenMeta.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TokenMeta.json new file mode 100644 index 00000000..0a644cab --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TokenMeta.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "Token full name" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "Token contract address (native or not)" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "Token symbol short name" + }, + { + "Parameter": "logo", + "Type": "string", + "Description": "URL to the logo image" + }, + { + "Parameter": "decimals", + "Type": "int32", + "Description": "Token decimals" + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "Token metadata fetched timestamp in UNIX millis." + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesRequest.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesRequest.json new file mode 100644 index 00000000..7b3864f0 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesRequest.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Filter by execution side of the trade", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction the trade", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the item result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Filter by the tradeId of the trade", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesResponse.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesResponse.json new file mode 100644 index 00000000..c521e51c --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "trades", + "Type": "SpotTrade array", + "Description": "Trades of a Spot Market" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "Paging indicates pages response is on" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesV2Request.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesV2Request.json new file mode 100644 index 00000000..7b3864f0 --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesV2Request.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the market's orderbook we want to fetch", + "Required": "Yes" + }, + { + "Parameter": "execution_side", + "Type": "string", + "Description": "Filter by execution side of the trade", + "Required": "Yes" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "Filter by direction the trade", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountId of the trader we want to get the trades from", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "Skip will skip the first n item from the item result", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "Limit is used to specify the maximum number of items to be returned.", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds that the trades must be equal or older than", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "MarketIds of the markets of which we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "Subaccount ids of traders we want to get trades", + "Required": "Yes" + }, + { + "Parameter": "execution_types", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "Filter by the tradeId of the trade", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID", + "Required": "Yes" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "Fee recipient address", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesV2Response.json b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesV2Response.json new file mode 100644 index 00000000..c521e51c --- /dev/null +++ b/source/json_tables/indexer_new/injective_spot_exchange_rpc/TradesV2Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "trades", + "Type": "SpotTrade array", + "Description": "Trades of a Spot Market" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "Paging indicates pages response is on" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/ExitConfig.json b/source/json_tables/indexer_new/injective_trading_rpc/ExitConfig.json new file mode 100644 index 00000000..1ced0cf0 --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/ExitConfig.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "exit_type", + "Type": "string", + "Description": "strategy exit type (stopLoss/takeProfit)" + }, + { + "Parameter": "exit_price", + "Type": "string", + "Description": "strategy stopLoss/takeProfit price" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/GetTradingStatsResponse.json b/source/json_tables/indexer_new/injective_trading_rpc/GetTradingStatsResponse.json new file mode 100644 index 00000000..9084c30e --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/GetTradingStatsResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "active_trading_strategies", + "Type": "uint64", + "Description": "Total of unique active trading strategies" + }, + { + "Parameter": "total_trading_strategies_created", + "Type": "uint64", + "Description": "Total number of created trading strategies" + }, + { + "Parameter": "total_tvl", + "Type": "string", + "Description": "Total TVL of all active trading strategies" + }, + { + "Parameter": "markets", + "Type": "Market array", + "Description": "Market stats" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/ListTradingStrategiesRequest.json b/source/json_tables/indexer_new/injective_trading_rpc/ListTradingStrategiesRequest.json new file mode 100644 index 00000000..e7dc209c --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/ListTradingStrategiesRequest.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "state", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the trading strategy", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount ID to filter by", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address", + "Required": "Yes" + }, + { + "Parameter": "pending_execution", + "Type": "bool", + "Description": "Indicates whether the trading strategy is pending execution", + "Required": "Yes" + }, + { + "Parameter": "start_time", + "Type": "int64", + "Description": "The starting timestamp in UNIX milliseconds for the creation time of the trading strategy", + "Required": "Yes" + }, + { + "Parameter": "end_time", + "Type": "int64", + "Description": "The ending timestamp in UNIX milliseconds for the creation time of the trading strategy", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "skip", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "strategy_type", + "Type": "string array", + "Description": "Filter by strategy type", + "Required": "Yes" + }, + { + "Parameter": "market_type", + "Type": "string", + "Description": "Filter by market type", + "Required": "Yes" + }, + { + "Parameter": "last_executed_time", + "Type": "int64", + "Description": "The last executed timestamp in UNIX milliseconds for the last executed time of the trading strategy", + "Required": "Yes" + }, + { + "Parameter": "with_tvl", + "Type": "bool", + "Description": "Include TVL in the response", + "Required": "Yes" + }, + { + "Parameter": "is_trailing_strategy", + "Type": "bool", + "Description": "Indicates whether the trading strategy is a trailing strategy", + "Required": "Yes" + }, + { + "Parameter": "with_performance", + "Type": "bool", + "Description": "Indicates whether the trading strategy performance should be included in the response", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/ListTradingStrategiesResponse.json b/source/json_tables/indexer_new/injective_trading_rpc/ListTradingStrategiesResponse.json new file mode 100644 index 00000000..8babdc4c --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/ListTradingStrategiesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "strategies", + "Type": "TradingStrategy array", + "Description": "The trading strategies" + }, + { + "Parameter": "paging", + "Type": "Paging", + "Description": "" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/Market.json b/source/json_tables/indexer_new/injective_trading_rpc/Market.json new file mode 100644 index 00000000..a45f6f89 --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/Market.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the trading strategy" + }, + { + "Parameter": "active_trading_strategies", + "Type": "uint64", + "Description": "Total of unique active trading strategies" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/Paging.json b/source/json_tables/indexer_new/injective_trading_rpc/Paging.json new file mode 100644 index 00000000..d11d26dc --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/Paging.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "total", + "Type": "int64", + "Description": "total number of txs saved in database" + }, + { + "Parameter": "from", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "to", + "Type": "int32", + "Description": "can be either block height or index num" + }, + { + "Parameter": "count_by_subaccount", + "Type": "int64", + "Description": "count entries by subaccount, serving some places on helix" + }, + { + "Parameter": "next", + "Type": "string array", + "Description": "array of tokens to navigate to the next pages" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/StrategyFinalData.json b/source/json_tables/indexer_new/injective_trading_rpc/StrategyFinalData.json new file mode 100644 index 00000000..00491707 --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/StrategyFinalData.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "initial_base_amount", + "Type": "string", + "Description": "Initial base amount" + }, + { + "Parameter": "initial_quote_amount", + "Type": "string", + "Description": "Initial quote amount" + }, + { + "Parameter": "final_base_amount", + "Type": "string", + "Description": "Final base amount" + }, + { + "Parameter": "final_quote_amount", + "Type": "string", + "Description": "Final quote amount" + }, + { + "Parameter": "initial_base_price", + "Type": "string", + "Description": "Initial base price" + }, + { + "Parameter": "initial_quote_price", + "Type": "string", + "Description": "Initial quote price" + }, + { + "Parameter": "final_base_price", + "Type": "string", + "Description": "Final base price" + }, + { + "Parameter": "final_quote_price", + "Type": "string", + "Description": "Final quote price" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/StreamStrategyRequest.json b/source/json_tables/indexer_new/injective_trading_rpc/StreamStrategyRequest.json new file mode 100644 index 00000000..c8f0d543 --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/StreamStrategyRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "account_addresses", + "Type": "string array", + "Description": "Account addresses", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the trading strategy", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/StreamStrategyResponse.json b/source/json_tables/indexer_new/injective_trading_rpc/StreamStrategyResponse.json new file mode 100644 index 00000000..56261e6d --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/StreamStrategyResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "trading_strategy", + "Type": "TradingStrategy", + "Description": "The trading strategy" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "Timestamp in UNIX millis" + } +] diff --git a/source/json_tables/indexer_new/injective_trading_rpc/TradingStrategy.json b/source/json_tables/indexer_new/injective_trading_rpc/TradingStrategy.json new file mode 100644 index 00000000..45301f24 --- /dev/null +++ b/source/json_tables/indexer_new/injective_trading_rpc/TradingStrategy.json @@ -0,0 +1,282 @@ +[ + { + "Parameter": "state", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketId of the trading strategy" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount ID of the trading strategy" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Contract address" + }, + { + "Parameter": "execution_price", + "Type": "string", + "Description": "Execution price of the trading strategy" + }, + { + "Parameter": "base_quantity", + "Type": "string", + "Description": "Base quantity of the trading strategy" + }, + { + "Parameter": "quote_quantity", + "Type": "string", + "Description": "Quote quantity of the trading strategy" + }, + { + "Parameter": "lower_bound", + "Type": "string", + "Description": "Lower bound of the trading strategy" + }, + { + "Parameter": "upper_bound", + "Type": "string", + "Description": "Upper bound of the trading strategy" + }, + { + "Parameter": "stop_loss", + "Type": "string", + "Description": "Stop loss limit of the trading strategy" + }, + { + "Parameter": "take_profit", + "Type": "string", + "Description": "Take profit limit of the trading strategy" + }, + { + "Parameter": "swap_fee", + "Type": "string", + "Description": "Swap fee of the trading strategy" + }, + { + "Parameter": "base_deposit", + "Type": "string", + "Description": "Base deposit at the time of closing the trading strategy" + }, + { + "Parameter": "quote_deposit", + "Type": "string", + "Description": "Quote deposit at the time of closing the trading strategy" + }, + { + "Parameter": "market_mid_price", + "Type": "string", + "Description": "Market mid price at the time of closing the trading strategy" + }, + { + "Parameter": "subscription_quote_quantity", + "Type": "string", + "Description": "Subscription quote quantity of the trading strategy" + }, + { + "Parameter": "subscription_base_quantity", + "Type": "string", + "Description": "Subscription base quantity of the trading strategy" + }, + { + "Parameter": "number_of_grid_levels", + "Type": "string", + "Description": "Number of grid levels of the trading strategy" + }, + { + "Parameter": "should_exit_with_quote_only", + "Type": "bool", + "Description": "Indicates whether the trading strategy should exit with quote only" + }, + { + "Parameter": "stop_reason", + "Type": "string", + "Description": "Indicates the reason for stopping the trading strategy" + }, + { + "Parameter": "pending_execution", + "Type": "bool", + "Description": "Indicates whether the trading strategy is pending execution" + }, + { + "Parameter": "created_height", + "Type": "int64", + "Description": "Block height when the strategy was created." + }, + { + "Parameter": "removed_height", + "Type": "int64", + "Description": "Block height when the strategy was removed." + }, + { + "Parameter": "created_at", + "Type": "int64", + "Description": "UpdatedAt timestamp in UNIX millis." + }, + { + "Parameter": "updated_at", + "Type": "int64", + "Description": "UpdatedAt timestamp in UNIX millis." + }, + { + "Parameter": "exit_type", + "Type": "string", + "Description": "Indicate how bot will convert funds (into base or quote or keep as is) after strategy ended" + }, + { + "Parameter": "stop_loss_config", + "Type": "ExitConfig", + "Description": "Exit config for stop loss" + }, + { + "Parameter": "take_profit_config", + "Type": "ExitConfig", + "Description": "Exit config for take profit" + }, + { + "Parameter": "strategy_type", + "Type": "string", + "Description": "Strategy type: arithmetic, geometric..." + }, + { + "Parameter": "contract_version", + "Type": "string", + "Description": "Version of the contract" + }, + { + "Parameter": "contract_name", + "Type": "string", + "Description": "Name of the contract" + }, + { + "Parameter": "market_type", + "Type": "string", + "Description": "Type of the market" + }, + { + "Parameter": "last_executed_at", + "Type": "int64", + "Description": "lastExecutedAt timestamp in UNIX millis." + }, + { + "Parameter": "trail_up_price", + "Type": "string", + "Description": "trailing up price" + }, + { + "Parameter": "trail_down_price", + "Type": "string", + "Description": "trailing down price" + }, + { + "Parameter": "trail_up_counter", + "Type": "int64", + "Description": "trailing up counter" + }, + { + "Parameter": "trail_down_counter", + "Type": "int64", + "Description": "trailing down counter" + }, + { + "Parameter": "tvl", + "Type": "string", + "Description": "TVL of the trading strategy" + }, + { + "Parameter": "pnl", + "Type": "string", + "Description": "PnL of the trading strategy" + }, + { + "Parameter": "pnl_perc", + "Type": "string", + "Description": "PnL percentage of the trading strategy" + }, + { + "Parameter": "pnl_updated_at", + "Type": "int64", + "Description": "pnlUpdatedAt timestamp in UNIX millis." + }, + { + "Parameter": "performance", + "Type": "string", + "Description": "Indicates the performance of the trading strategy" + }, + { + "Parameter": "roi", + "Type": "string", + "Description": "Return on investment of the trading strategy" + }, + { + "Parameter": "initial_base_price", + "Type": "string", + "Description": "Initial base price of the trading strategy from asset price service Use strategyFinalData if available to have more accurate data" + }, + { + "Parameter": "initial_quote_price", + "Type": "string", + "Description": "Initial quote price of the trading strategy from asset price service Use strategyFinalData if available to have more accurate data" + }, + { + "Parameter": "current_base_price", + "Type": "string", + "Description": "Current base price of the trading strategy from asset price service Use strategyFinalData if available to have more accurate data" + }, + { + "Parameter": "current_quote_price", + "Type": "string", + "Description": "Current quote price of the trading strategy from asset price service Use strategyFinalData if available to have more accurate data" + }, + { + "Parameter": "final_base_price", + "Type": "string", + "Description": "Final base price of the trading strategy from asset price service Use strategyFinalData if available to have more accurate data" + }, + { + "Parameter": "final_quote_price", + "Type": "string", + "Description": "Final quote price of the trading strategy from asset price service Use strategyFinalData if available to have more accurate data" + }, + { + "Parameter": "final_data", + "Type": "StrategyFinalData", + "Description": "Final data of the trading strategy. This is present from contract v0.8.4." + }, + { + "Parameter": "margin_ratio", + "Type": "string", + "Description": "Margin ratio of the trading strategy" + }, + { + "Parameter": "lower_trailing_bound", + "Type": "string", + "Description": "Lower trailing bound of the trading strategy" + }, + { + "Parameter": "upper_trailing_bound", + "Type": "string", + "Description": "Upper trailing bound of the trading strategy" + }, + { + "Parameter": "new_upper_bound", + "Type": "string", + "Description": "New upper bound of the trading strategy" + }, + { + "Parameter": "new_lower_bound", + "Type": "string", + "Description": "New lower bound of the trading strategy" + } +] diff --git a/source/json_tables/injective/auction/Bid.json b/source/json_tables/injective/auction/Bid.json new file mode 100644 index 00000000..79692fa8 --- /dev/null +++ b/source/json_tables/injective/auction/Bid.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "bidder", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coin", + "Description": "" + } +] diff --git a/source/json_tables/injective/auction/GenesisState.json b/source/json_tables/injective/auction/GenesisState.json new file mode 100644 index 00000000..9a0d3454 --- /dev/null +++ b/source/json_tables/injective/auction/GenesisState.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of related to auction." + }, + { + "Parameter": "auction_round", + "Type": "uint64", + "Description": "current auction round" + }, + { + "Parameter": "highest_bid", + "Type": "Bid", + "Description": "current highest bid" + }, + { + "Parameter": "auction_ending_timestamp", + "Type": "int64", + "Description": "auction ending timestamp" + }, + { + "Parameter": "last_auction_result", + "Type": "LastAuctionResult", + "Description": "last auction result" + } +] diff --git a/source/json_tables/injective/auction/LastAuctionResult.json b/source/json_tables/injective/auction/LastAuctionResult.json new file mode 100644 index 00000000..3a4ec69f --- /dev/null +++ b/source/json_tables/injective/auction/LastAuctionResult.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "winner", + "Type": "string", + "Description": "winner describes the address of the winner" + }, + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coin", + "Description": "amount describes the amount the winner get from the auction" + }, + { + "Parameter": "round", + "Type": "uint64", + "Description": "round defines the round number of auction" + } +] diff --git a/source/json_tables/injective/auction/MsgBid.json b/source/json_tables/injective/auction/MsgBid.json new file mode 100644 index 00000000..0540f34a --- /dev/null +++ b/source/json_tables/injective/auction/MsgBid.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "bid_amount", + "Type": "types.Coin", + "Description": "amount of the bid in INJ tokens", + "Required": "Yes" + }, + { + "Parameter": "round", + "Type": "uint64", + "Description": "the current auction round being bid on", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/auction/MsgUpdateParams.json b/source/json_tables/injective/auction/MsgUpdateParams.json new file mode 100644 index 00000000..7e63c10e --- /dev/null +++ b/source/json_tables/injective/auction/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the ocr parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/auction/Params.json b/source/json_tables/injective/auction/Params.json new file mode 100644 index 00000000..f7910b69 --- /dev/null +++ b/source/json_tables/injective/auction/Params.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "auction_period", + "Type": "int64", + "Description": "auction_period_duration defines the auction period duration" + }, + { + "Parameter": "min_next_bid_increment_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_next_bid_increment_rate defines the minimum increment rate for new bids" + }, + { + "Parameter": "inj_basket_max_cap", + "Type": "cosmossdk_io_math.Int", + "Description": "inj_basket_max_cap defines the maximum cap for INJ contained in an auction basket" + } +] diff --git a/source/json_tables/injective/auction/QueryAuctionParamsResponse.json b/source/json_tables/injective/auction/QueryAuctionParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/auction/QueryAuctionParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/auction/QueryCurrentAuctionBasketResponse.json b/source/json_tables/injective/auction/QueryCurrentAuctionBasketResponse.json new file mode 100644 index 00000000..c77a1f57 --- /dev/null +++ b/source/json_tables/injective/auction/QueryCurrentAuctionBasketResponse.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "amount", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "amount describes the amount put on auction" + }, + { + "Parameter": "auctionRound", + "Type": "uint64", + "Description": "auctionRound describes current auction round" + }, + { + "Parameter": "auctionClosingTime", + "Type": "uint64", + "Description": "auctionClosingTime describes auction close time for the round" + }, + { + "Parameter": "highestBidder", + "Type": "string", + "Description": "highestBidder describes highest bidder on current round" + }, + { + "Parameter": "highestBidAmount", + "Type": "cosmossdk_io_math.Int", + "Description": "highestBidAmount describes highest bid amount on current round" + } +] diff --git a/source/json_tables/injective/auction/QueryLastAuctionResultResponse.json b/source/json_tables/injective/auction/QueryLastAuctionResultResponse.json new file mode 100644 index 00000000..dc731513 --- /dev/null +++ b/source/json_tables/injective/auction/QueryLastAuctionResultResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "last_auction_result", + "Type": "LastAuctionResult", + "Description": "" + } +] diff --git a/source/json_tables/injective/auction/QueryModuleStateResponse.json b/source/json_tables/injective/auction/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/auction/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/erc20/GenesisState.json b/source/json_tables/injective/erc20/GenesisState.json new file mode 100644 index 00000000..ce7b6d60 --- /dev/null +++ b/source/json_tables/injective/erc20/GenesisState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + }, + { + "Parameter": "token_pairs", + "Type": "TokenPair array", + "Description": "" + } +] diff --git a/source/json_tables/injective/erc20/MsgCreateTokenPair.json b/source/json_tables/injective/erc20/MsgCreateTokenPair.json new file mode 100644 index 00000000..3178b52b --- /dev/null +++ b/source/json_tables/injective/erc20/MsgCreateTokenPair.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token_pair", + "Type": "TokenPair", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/erc20/MsgCreateTokenPairResponse.json b/source/json_tables/injective/erc20/MsgCreateTokenPairResponse.json new file mode 100644 index 00000000..d3b5b773 --- /dev/null +++ b/source/json_tables/injective/erc20/MsgCreateTokenPairResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "token_pair", + "Type": "TokenPair", + "Description": "" + } +] diff --git a/source/json_tables/injective/erc20/MsgDeleteTokenPair.json b/source/json_tables/injective/erc20/MsgDeleteTokenPair.json new file mode 100644 index 00000000..d32de1cf --- /dev/null +++ b/source/json_tables/injective/erc20/MsgDeleteTokenPair.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "bank_denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/erc20/MsgUpdateParams.json b/source/json_tables/injective/erc20/MsgUpdateParams.json new file mode 100644 index 00000000..9456a131 --- /dev/null +++ b/source/json_tables/injective/erc20/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the erc20 parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/erc20/Params.json b/source/json_tables/injective/erc20/Params.json new file mode 100644 index 00000000..5709a14c --- /dev/null +++ b/source/json_tables/injective/erc20/Params.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "denom_creation_fee", + "Type": "types.Coin", + "Description": "" + } +] diff --git a/source/json_tables/injective/erc20/QueryAllTokenPairsRequest.json b/source/json_tables/injective/erc20/QueryAllTokenPairsRequest.json new file mode 100644 index 00000000..79346d2c --- /dev/null +++ b/source/json_tables/injective/erc20/QueryAllTokenPairsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/injective/erc20/QueryAllTokenPairsResponse.json b/source/json_tables/injective/erc20/QueryAllTokenPairsResponse.json new file mode 100644 index 00000000..b3d8d0e0 --- /dev/null +++ b/source/json_tables/injective/erc20/QueryAllTokenPairsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "token_pairs", + "Type": "TokenPair array", + "Description": "" + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/injective/erc20/QueryParamsResponse.json b/source/json_tables/injective/erc20/QueryParamsResponse.json new file mode 100644 index 00000000..27703560 --- /dev/null +++ b/source/json_tables/injective/erc20/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + } +] diff --git a/source/json_tables/injective/erc20/QueryTokenPairByDenomRequest.json b/source/json_tables/injective/erc20/QueryTokenPairByDenomRequest.json new file mode 100644 index 00000000..f99026c1 --- /dev/null +++ b/source/json_tables/injective/erc20/QueryTokenPairByDenomRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "bank_denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/erc20/QueryTokenPairByDenomResponse.json b/source/json_tables/injective/erc20/QueryTokenPairByDenomResponse.json new file mode 100644 index 00000000..d3b5b773 --- /dev/null +++ b/source/json_tables/injective/erc20/QueryTokenPairByDenomResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "token_pair", + "Type": "TokenPair", + "Description": "" + } +] diff --git a/source/json_tables/injective/erc20/QueryTokenPairByERC20AddressRequest.json b/source/json_tables/injective/erc20/QueryTokenPairByERC20AddressRequest.json new file mode 100644 index 00000000..8598bccf --- /dev/null +++ b/source/json_tables/injective/erc20/QueryTokenPairByERC20AddressRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "erc20_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/erc20/QueryTokenPairByERC20AddressResponse.json b/source/json_tables/injective/erc20/QueryTokenPairByERC20AddressResponse.json new file mode 100644 index 00000000..d3b5b773 --- /dev/null +++ b/source/json_tables/injective/erc20/QueryTokenPairByERC20AddressResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "token_pair", + "Type": "TokenPair", + "Description": "" + } +] diff --git a/source/json_tables/injective/erc20/TokenPair.json b/source/json_tables/injective/erc20/TokenPair.json new file mode 100644 index 00000000..d9e3a96f --- /dev/null +++ b/source/json_tables/injective/erc20/TokenPair.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "bank_denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "erc20_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/evm/AccessListTx.json b/source/json_tables/injective/evm/AccessListTx.json new file mode 100644 index 00000000..2fcce0d5 --- /dev/null +++ b/source/json_tables/injective/evm/AccessListTx.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "chain_id", + "Type": "cosmossdk_io_math.Int", + "Description": "chain_id of the destination EVM chain" + }, + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "nonce corresponds to the account nonce (transaction sequence)." + }, + { + "Parameter": "gas_price", + "Type": "cosmossdk_io_math.Int", + "Description": "gas_price defines the value for each gas unit" + }, + { + "Parameter": "gas", + "Type": "uint64", + "Description": "gas defines the gas limit defined for the transaction." + }, + { + "Parameter": "to", + "Type": "string", + "Description": "to is the recipient address in hex format" + }, + { + "Parameter": "value", + "Type": "cosmossdk_io_math.Int", + "Description": "value defines the unsigned integer value of the transaction amount." + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "data is the data payload bytes of the transaction." + }, + { + "Parameter": "accesses", + "Type": "AccessList", + "Description": "accesses is an array of access tuples" + }, + { + "Parameter": "v", + "Type": "byte array", + "Description": "v defines the signature value" + }, + { + "Parameter": "r", + "Type": "byte array", + "Description": "r defines the signature value" + }, + { + "Parameter": "s", + "Type": "byte array", + "Description": "s define the signature value" + } +] diff --git a/source/json_tables/injective/evm/AccessTuple.json b/source/json_tables/injective/evm/AccessTuple.json new file mode 100644 index 00000000..1f71ac0c --- /dev/null +++ b/source/json_tables/injective/evm/AccessTuple.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is a hex formatted ethereum address" + }, + { + "Parameter": "storage_keys", + "Type": "string array", + "Description": "storage_keys are hex formatted hashes of the storage keys" + } +] diff --git a/source/json_tables/injective/evm/BlobConfig.json b/source/json_tables/injective/evm/BlobConfig.json new file mode 100644 index 00000000..9ddefbc0 --- /dev/null +++ b/source/json_tables/injective/evm/BlobConfig.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "target", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "max", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "base_fee_update_fraction", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/evm/BlobScheduleConfig.json b/source/json_tables/injective/evm/BlobScheduleConfig.json new file mode 100644 index 00000000..33d1f295 --- /dev/null +++ b/source/json_tables/injective/evm/BlobScheduleConfig.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "cancun", + "Type": "BlobConfig", + "Description": "" + }, + { + "Parameter": "prague", + "Type": "BlobConfig", + "Description": "" + }, + { + "Parameter": "osaka", + "Type": "BlobConfig", + "Description": "" + }, + { + "Parameter": "verkle", + "Type": "BlobConfig", + "Description": "" + } +] diff --git a/source/json_tables/injective/evm/ChainConfig.json b/source/json_tables/injective/evm/ChainConfig.json new file mode 100644 index 00000000..46c09e1b --- /dev/null +++ b/source/json_tables/injective/evm/ChainConfig.json @@ -0,0 +1,112 @@ +[ + { + "Parameter": "homestead_block", + "Type": "cosmossdk_io_math.Int", + "Description": "homestead_block switch (nil no fork, 0 = already homestead)" + }, + { + "Parameter": "dao_fork_block", + "Type": "cosmossdk_io_math.Int", + "Description": "dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork)" + }, + { + "Parameter": "dao_fork_support", + "Type": "bool", + "Description": "dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork" + }, + { + "Parameter": "eip150_block", + "Type": "cosmossdk_io_math.Int", + "Description": "eip150_block: EIP150 implements the Gas price changes (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork)" + }, + { + "Parameter": "eip150_hash", + "Type": "string", + "Description": "eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed)" + }, + { + "Parameter": "eip155_block", + "Type": "cosmossdk_io_math.Int", + "Description": "eip155_block: EIP155Block HF block" + }, + { + "Parameter": "eip158_block", + "Type": "cosmossdk_io_math.Int", + "Description": "eip158_block: EIP158 HF block" + }, + { + "Parameter": "byzantium_block", + "Type": "cosmossdk_io_math.Int", + "Description": "byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium)" + }, + { + "Parameter": "constantinople_block", + "Type": "cosmossdk_io_math.Int", + "Description": "constantinople_block: Constantinople switch block (nil no fork, 0 = already activated)" + }, + { + "Parameter": "petersburg_block", + "Type": "cosmossdk_io_math.Int", + "Description": "petersburg_block: Petersburg switch block (nil same as Constantinople)" + }, + { + "Parameter": "istanbul_block", + "Type": "cosmossdk_io_math.Int", + "Description": "istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul)" + }, + { + "Parameter": "muir_glacier_block", + "Type": "cosmossdk_io_math.Int", + "Description": "muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated)" + }, + { + "Parameter": "berlin_block", + "Type": "cosmossdk_io_math.Int", + "Description": "berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin)" + }, + { + "Parameter": "london_block", + "Type": "cosmossdk_io_math.Int", + "Description": "london_block: London switch block (nil = no fork, 0 = already on london)" + }, + { + "Parameter": "arrow_glacier_block", + "Type": "cosmossdk_io_math.Int", + "Description": "arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated)" + }, + { + "Parameter": "gray_glacier_block", + "Type": "cosmossdk_io_math.Int", + "Description": "gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated)" + }, + { + "Parameter": "merge_netsplit_block", + "Type": "cosmossdk_io_math.Int", + "Description": "merge_netsplit_block: Virtual fork after The Merge to use as a network splitter" + }, + { + "Parameter": "shanghai_time", + "Type": "cosmossdk_io_math.Int", + "Description": "shanghai switch time (nil = no fork, 0 = already on shanghai)" + }, + { + "Parameter": "cancun_time", + "Type": "cosmossdk_io_math.Int", + "Description": "cancun switch time (nil = no fork, 0 = already on cancun)" + }, + { + "Parameter": "prague_time", + "Type": "cosmossdk_io_math.Int", + "Description": "prague switch time (nil = no fork, 0 = already on prague)" + }, + { + "Parameter": "eip155_chain_id", + "Type": "cosmossdk_io_math.Int", + "Description": "eip155_chain_id: identifies the chain and is used for replay protection" + }, + { + "Parameter": "blob_schedule_config", + "Type": "BlobScheduleConfig", + "Description": "eip7840: per-fork schedule of max and target blob counts in client configuration files" + } +] diff --git a/source/json_tables/injective/evm/DynamicFeeTx.json b/source/json_tables/injective/evm/DynamicFeeTx.json new file mode 100644 index 00000000..bd408b26 --- /dev/null +++ b/source/json_tables/injective/evm/DynamicFeeTx.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "chain_id", + "Type": "cosmossdk_io_math.Int", + "Description": "chain_id of the destination EVM chain" + }, + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "nonce corresponds to the account nonce (transaction sequence)." + }, + { + "Parameter": "gas_tip_cap", + "Type": "cosmossdk_io_math.Int", + "Description": "gas_tip_cap defines the max value for the gas tip" + }, + { + "Parameter": "gas_fee_cap", + "Type": "cosmossdk_io_math.Int", + "Description": "gas_fee_cap defines the max value for the gas fee" + }, + { + "Parameter": "gas", + "Type": "uint64", + "Description": "gas defines the gas limit defined for the transaction." + }, + { + "Parameter": "to", + "Type": "string", + "Description": "to is the hex formatted address of the recipient" + }, + { + "Parameter": "value", + "Type": "cosmossdk_io_math.Int", + "Description": "value defines the the transaction amount." + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "data is the data payload bytes of the transaction." + }, + { + "Parameter": "accesses", + "Type": "AccessList", + "Description": "accesses is an array of access tuples" + }, + { + "Parameter": "v", + "Type": "byte array", + "Description": "v defines the signature value" + }, + { + "Parameter": "r", + "Type": "byte array", + "Description": "r defines the signature value" + }, + { + "Parameter": "s", + "Type": "byte array", + "Description": "s define the signature value" + } +] diff --git a/source/json_tables/injective/evm/EstimateGasResponse.json b/source/json_tables/injective/evm/EstimateGasResponse.json new file mode 100644 index 00000000..19daaf68 --- /dev/null +++ b/source/json_tables/injective/evm/EstimateGasResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "gas", + "Type": "uint64", + "Description": "gas returns the estimated gas" + }, + { + "Parameter": "ret", + "Type": "byte array", + "Description": "ret is the returned data from evm function (result or data supplied with revert opcode)" + }, + { + "Parameter": "vm_error", + "Type": "string", + "Description": "vm_error is the error returned by vm execution" + } +] diff --git a/source/json_tables/injective/evm/EthCallRequest.json b/source/json_tables/injective/evm/EthCallRequest.json new file mode 100644 index 00000000..f9c0a6d1 --- /dev/null +++ b/source/json_tables/injective/evm/EthCallRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "args", + "Type": "byte array", + "Description": "args uses the same json format as the json rpc api.", + "Required": "Yes" + }, + { + "Parameter": "gas_cap", + "Type": "uint64", + "Description": "gas_cap defines the default gas cap to be used", + "Required": "Yes" + }, + { + "Parameter": "proposer_address", + "Type": "github_com_cosmos_cosmos_sdk_types.ConsAddress", + "Description": "proposer_address of the requested block in hex format", + "Required": "Yes" + }, + { + "Parameter": "chain_id", + "Type": "int64", + "Description": "chain_id is the eip155 chain id parsed from the requested block header", + "Required": "Yes" + }, + { + "Parameter": "overrides", + "Type": "byte array", + "Description": "state overrides encoded as json", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/GenesisAccount.json b/source/json_tables/injective/evm/GenesisAccount.json new file mode 100644 index 00000000..a207df8a --- /dev/null +++ b/source/json_tables/injective/evm/GenesisAccount.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address defines an ethereum hex formated address of an account" + }, + { + "Parameter": "code", + "Type": "string", + "Description": "code defines the hex bytes of the account code." + }, + { + "Parameter": "storage", + "Type": "Storage", + "Description": "storage defines the set of state key values for the account." + } +] diff --git a/source/json_tables/injective/evm/GenesisState.json b/source/json_tables/injective/evm/GenesisState.json new file mode 100644 index 00000000..9a2010be --- /dev/null +++ b/source/json_tables/injective/evm/GenesisState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "accounts", + "Type": "GenesisAccount array", + "Description": "accounts is an array containing the ethereum genesis accounts." + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of the module." + } +] diff --git a/source/json_tables/injective/evm/LegacyTx.json b/source/json_tables/injective/evm/LegacyTx.json new file mode 100644 index 00000000..ed1ba994 --- /dev/null +++ b/source/json_tables/injective/evm/LegacyTx.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "nonce corresponds to the account nonce (transaction sequence)." + }, + { + "Parameter": "gas_price", + "Type": "cosmossdk_io_math.Int", + "Description": "gas_price defines the value for each gas unit" + }, + { + "Parameter": "gas", + "Type": "uint64", + "Description": "gas defines the gas limit defined for the transaction." + }, + { + "Parameter": "to", + "Type": "string", + "Description": "to is the hex formatted address of the recipient" + }, + { + "Parameter": "value", + "Type": "cosmossdk_io_math.Int", + "Description": "value defines the unsigned integer value of the transaction amount." + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "data is the data payload bytes of the transaction." + }, + { + "Parameter": "v", + "Type": "byte array", + "Description": "v defines the signature value" + }, + { + "Parameter": "r", + "Type": "byte array", + "Description": "r defines the signature value" + }, + { + "Parameter": "s", + "Type": "byte array", + "Description": "s define the signature value" + } +] diff --git a/source/json_tables/injective/evm/Log.json b/source/json_tables/injective/evm/Log.json new file mode 100644 index 00000000..90fedc97 --- /dev/null +++ b/source/json_tables/injective/evm/Log.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address of the contract that generated the event" + }, + { + "Parameter": "topics", + "Type": "string array", + "Description": "topics is a list of topics provided by the contract." + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "data which is supplied by the contract, usually ABI-encoded" + }, + { + "Parameter": "block_number", + "Type": "uint64", + "Description": "block_number of the block in which the transaction was included" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "tx_hash is the transaction hash" + }, + { + "Parameter": "tx_index", + "Type": "uint64", + "Description": "tx_index of the transaction in the block" + }, + { + "Parameter": "block_hash", + "Type": "string", + "Description": "block_hash of the block in which the transaction was included" + }, + { + "Parameter": "index", + "Type": "uint64", + "Description": "index of the log in the block" + }, + { + "Parameter": "removed", + "Type": "bool", + "Description": "removed is true if this log was reverted due to a chain reorganisation. You must pay attention to this field if you receive logs through a filter query." + } +] diff --git a/source/json_tables/injective/evm/MsgEthereumTx.json b/source/json_tables/injective/evm/MsgEthereumTx.json new file mode 100644 index 00000000..cbe09c06 --- /dev/null +++ b/source/json_tables/injective/evm/MsgEthereumTx.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "data", + "Type": "types.Any", + "Description": "data is inner transaction data of the Ethereum transaction", + "Required": "No" + }, + { + "Parameter": "deprecated_hash", + "Type": "string", + "Description": "hash of the transaction in hex format", + "Required": "Yes" + }, + { + "Parameter": "deprecated_from", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "from", + "Type": "byte array", + "Description": "from is the bytes of ethereum signer address. This address value is checked against the address derived from the signature (V, R, S) using the secp256k1 elliptic curve", + "Required": "Yes" + }, + { + "Parameter": "raw", + "Type": "EthereumTx", + "Description": "raw is the raw bytes of the ethereum transaction", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/MsgEthereumTxResponse.json b/source/json_tables/injective/evm/MsgEthereumTxResponse.json new file mode 100644 index 00000000..0e98fa95 --- /dev/null +++ b/source/json_tables/injective/evm/MsgEthereumTxResponse.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "hash", + "Type": "string", + "Description": "hash of the ethereum transaction in hex format. This hash differs from the Tendermint sha256 hash of the transaction bytes. See https://github.com/tendermint/tendermint/issues/6539 for reference" + }, + { + "Parameter": "logs", + "Type": "Log array", + "Description": "logs contains the transaction hash and the proto-compatible ethereum logs." + }, + { + "Parameter": "ret", + "Type": "byte array", + "Description": "ret is the returned data from evm function (result or data supplied with revert opcode)" + }, + { + "Parameter": "vm_error", + "Type": "string", + "Description": "vm_error is the error returned by vm execution" + }, + { + "Parameter": "gas_used", + "Type": "uint64", + "Description": "gas_used specifies how much gas was consumed by the transaction" + }, + { + "Parameter": "block_hash", + "Type": "byte array", + "Description": "include the block hash for json-rpc to use" + } +] diff --git a/source/json_tables/injective/evm/MsgUpdateParams.json b/source/json_tables/injective/evm/MsgUpdateParams.json new file mode 100644 index 00000000..456fa828 --- /dev/null +++ b/source/json_tables/injective/evm/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the x/evm parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/Params.json b/source/json_tables/injective/evm/Params.json new file mode 100644 index 00000000..801d539c --- /dev/null +++ b/source/json_tables/injective/evm/Params.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "evm_denom", + "Type": "string", + "Description": "evm_denom represents the token denomination used to run the EVM state transitions." + }, + { + "Parameter": "enable_create", + "Type": "bool", + "Description": "enable_create toggles state transitions that use the vm.Create function" + }, + { + "Parameter": "enable_call", + "Type": "bool", + "Description": "enable_call toggles state transitions that use the vm.Call function" + }, + { + "Parameter": "extra_eips", + "Type": "int64 array", + "Description": "extra_eips defines the additional EIPs for the vm.Config" + }, + { + "Parameter": "chain_config", + "Type": "ChainConfig", + "Description": "chain_config defines the EVM chain configuration parameters" + }, + { + "Parameter": "allow_unprotected_txs", + "Type": "bool", + "Description": "allow_unprotected_txs defines if replay-protected (i.e non EIP155 signed) transactions can be executed on the state machine." + }, + { + "Parameter": "authorized_deployers", + "Type": "string array", + "Description": "list of ETH addresses that are allowed to deploy contracts. Only relevant if permissioned is true." + }, + { + "Parameter": "permissioned", + "Type": "bool", + "Description": "make contract deployment permissioned, such that only accounts listed in authorized_deployers are allowed to deploy contracts." + } +] diff --git a/source/json_tables/injective/evm/QueryAccountRequest.json b/source/json_tables/injective/evm/QueryAccountRequest.json new file mode 100644 index 00000000..fe4905a9 --- /dev/null +++ b/source/json_tables/injective/evm/QueryAccountRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the ethereum hex address to query the account for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryAccountResponse.json b/source/json_tables/injective/evm/QueryAccountResponse.json new file mode 100644 index 00000000..fad3f4d9 --- /dev/null +++ b/source/json_tables/injective/evm/QueryAccountResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "balance", + "Type": "string", + "Description": "balance is the balance of the EVM denomination." + }, + { + "Parameter": "code_hash", + "Type": "string", + "Description": "code_hash is the hex-formatted code bytes from the EOA." + }, + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "nonce is the account's sequence number." + } +] diff --git a/source/json_tables/injective/evm/QueryBalanceRequest.json b/source/json_tables/injective/evm/QueryBalanceRequest.json new file mode 100644 index 00000000..88d5aca1 --- /dev/null +++ b/source/json_tables/injective/evm/QueryBalanceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the ethereum hex address to query the balance for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryBalanceResponse.json b/source/json_tables/injective/evm/QueryBalanceResponse.json new file mode 100644 index 00000000..940b0151 --- /dev/null +++ b/source/json_tables/injective/evm/QueryBalanceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance", + "Type": "string", + "Description": "balance is the balance of the EVM denomination." + } +] diff --git a/source/json_tables/injective/evm/QueryBaseFeeResponse.json b/source/json_tables/injective/evm/QueryBaseFeeResponse.json new file mode 100644 index 00000000..307364f2 --- /dev/null +++ b/source/json_tables/injective/evm/QueryBaseFeeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "base_fee", + "Type": "cosmossdk_io_math.Int", + "Description": "base_fee is the EIP1559 base fee" + } +] diff --git a/source/json_tables/injective/evm/QueryCodeRequest.json b/source/json_tables/injective/evm/QueryCodeRequest.json new file mode 100644 index 00000000..efd75a5f --- /dev/null +++ b/source/json_tables/injective/evm/QueryCodeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the ethereum hex address to query the code for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryCodeResponse.json b/source/json_tables/injective/evm/QueryCodeResponse.json new file mode 100644 index 00000000..73aaae48 --- /dev/null +++ b/source/json_tables/injective/evm/QueryCodeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "code", + "Type": "byte array", + "Description": "code represents the code bytes from an ethereum address." + } +] diff --git a/source/json_tables/injective/evm/QueryCosmosAccountRequest.json b/source/json_tables/injective/evm/QueryCosmosAccountRequest.json new file mode 100644 index 00000000..fe4905a9 --- /dev/null +++ b/source/json_tables/injective/evm/QueryCosmosAccountRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the ethereum hex address to query the account for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryCosmosAccountResponse.json b/source/json_tables/injective/evm/QueryCosmosAccountResponse.json new file mode 100644 index 00000000..63688956 --- /dev/null +++ b/source/json_tables/injective/evm/QueryCosmosAccountResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "cosmos_address", + "Type": "string", + "Description": "cosmos_address is the cosmos address of the account." + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "sequence is the account's sequence number." + }, + { + "Parameter": "account_number", + "Type": "uint64", + "Description": "account_number is the account number" + } +] diff --git a/source/json_tables/injective/evm/QueryParamsResponse.json b/source/json_tables/injective/evm/QueryParamsResponse.json new file mode 100644 index 00000000..dc222941 --- /dev/null +++ b/source/json_tables/injective/evm/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params define the evm module parameters." + } +] diff --git a/source/json_tables/injective/evm/QueryStorageRequest.json b/source/json_tables/injective/evm/QueryStorageRequest.json new file mode 100644 index 00000000..52e36a18 --- /dev/null +++ b/source/json_tables/injective/evm/QueryStorageRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address is the ethereum hex address to query the storage state for.", + "Required": "Yes" + }, + { + "Parameter": "key", + "Type": "string", + "Description": "key defines the key of the storage state", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryStorageResponse.json b/source/json_tables/injective/evm/QueryStorageResponse.json new file mode 100644 index 00000000..c758445c --- /dev/null +++ b/source/json_tables/injective/evm/QueryStorageResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "value", + "Type": "string", + "Description": "value defines the storage state value hash associated with the given key." + } +] diff --git a/source/json_tables/injective/evm/QueryTraceBlockRequest.json b/source/json_tables/injective/evm/QueryTraceBlockRequest.json new file mode 100644 index 00000000..f8e07705 --- /dev/null +++ b/source/json_tables/injective/evm/QueryTraceBlockRequest.json @@ -0,0 +1,44 @@ +[ + { + "Parameter": "txs", + "Type": "MsgEthereumTx array", + "Description": "txs is an array of messages in the block", + "Required": "No" + }, + { + "Parameter": "trace_config", + "Type": "TraceConfig", + "Description": "trace_config holds extra parameters to trace functions.", + "Required": "No" + }, + { + "Parameter": "block_number", + "Type": "int64", + "Description": "block_number of the traced block", + "Required": "Yes" + }, + { + "Parameter": "block_hash", + "Type": "string", + "Description": "block_hash (hex) of the traced block", + "Required": "Yes" + }, + { + "Parameter": "block_time", + "Type": "time.Time", + "Description": "block_time of the traced block", + "Required": "Yes" + }, + { + "Parameter": "proposer_address", + "Type": "github_com_cosmos_cosmos_sdk_types.ConsAddress", + "Description": "proposer_address is the address of the requested block", + "Required": "Yes" + }, + { + "Parameter": "chain_id", + "Type": "int64", + "Description": "chain_id is the eip155 chain id parsed from the requested block header", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryTraceBlockResponse.json b/source/json_tables/injective/evm/QueryTraceBlockResponse.json new file mode 100644 index 00000000..22257860 --- /dev/null +++ b/source/json_tables/injective/evm/QueryTraceBlockResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "data", + "Type": "byte array", + "Description": "data is the response serialized in bytes" + } +] diff --git a/source/json_tables/injective/evm/QueryTraceCallRequest.json b/source/json_tables/injective/evm/QueryTraceCallRequest.json new file mode 100644 index 00000000..673be606 --- /dev/null +++ b/source/json_tables/injective/evm/QueryTraceCallRequest.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "args", + "Type": "byte array", + "Description": "args uses the same json format as the json rpc api.", + "Required": "Yes" + }, + { + "Parameter": "gas_cap", + "Type": "uint64", + "Description": "gas_cap defines the default gas cap to be used", + "Required": "Yes" + }, + { + "Parameter": "proposer_address", + "Type": "github_com_cosmos_cosmos_sdk_types.ConsAddress", + "Description": "proposer_address of the requested block in hex format", + "Required": "Yes" + }, + { + "Parameter": "trace_config", + "Type": "TraceConfig", + "Description": "trace_config holds extra parameters to trace functions.", + "Required": "No" + }, + { + "Parameter": "block_number", + "Type": "int64", + "Description": "block_number of requested transaction", + "Required": "Yes" + }, + { + "Parameter": "block_hash", + "Type": "string", + "Description": "block_hash of requested transaction", + "Required": "Yes" + }, + { + "Parameter": "block_time", + "Type": "time.Time", + "Description": "block_time of requested transaction", + "Required": "Yes" + }, + { + "Parameter": "chain_id", + "Type": "int64", + "Description": "chain_id is the the eip155 chain id parsed from the requested block header", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryTraceCallResponse.json b/source/json_tables/injective/evm/QueryTraceCallResponse.json new file mode 100644 index 00000000..22257860 --- /dev/null +++ b/source/json_tables/injective/evm/QueryTraceCallResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "data", + "Type": "byte array", + "Description": "data is the response serialized in bytes" + } +] diff --git a/source/json_tables/injective/evm/QueryTraceTxRequest.json b/source/json_tables/injective/evm/QueryTraceTxRequest.json new file mode 100644 index 00000000..b2346875 --- /dev/null +++ b/source/json_tables/injective/evm/QueryTraceTxRequest.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "msg", + "Type": "MsgEthereumTx", + "Description": "msg is the MsgEthereumTx for the requested transaction", + "Required": "No" + }, + { + "Parameter": "trace_config", + "Type": "TraceConfig", + "Description": "trace_config holds extra parameters to trace functions.", + "Required": "No" + }, + { + "Parameter": "predecessors", + "Type": "MsgEthereumTx array", + "Description": "predecessors is an array of transactions included in the same block need to be replayed first to get correct context for tracing.", + "Required": "No" + }, + { + "Parameter": "block_number", + "Type": "int64", + "Description": "block_number of requested transaction", + "Required": "Yes" + }, + { + "Parameter": "block_hash", + "Type": "string", + "Description": "block_hash of requested transaction", + "Required": "Yes" + }, + { + "Parameter": "block_time", + "Type": "time.Time", + "Description": "block_time of requested transaction", + "Required": "Yes" + }, + { + "Parameter": "proposer_address", + "Type": "github_com_cosmos_cosmos_sdk_types.ConsAddress", + "Description": "proposer_address is the proposer of the requested block", + "Required": "Yes" + }, + { + "Parameter": "chain_id", + "Type": "int64", + "Description": "chain_id is the the eip155 chain id parsed from the requested block header", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryTraceTxResponse.json b/source/json_tables/injective/evm/QueryTraceTxResponse.json new file mode 100644 index 00000000..22257860 --- /dev/null +++ b/source/json_tables/injective/evm/QueryTraceTxResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "data", + "Type": "byte array", + "Description": "data is the response serialized in bytes" + } +] diff --git a/source/json_tables/injective/evm/QueryTxLogsRequest.json b/source/json_tables/injective/evm/QueryTxLogsRequest.json new file mode 100644 index 00000000..f4d0bd84 --- /dev/null +++ b/source/json_tables/injective/evm/QueryTxLogsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "hash", + "Type": "string", + "Description": "hash is the ethereum transaction hex hash to query the logs for.", + "Required": "Yes" + }, + { + "Parameter": "pagination", + "Type": "query.PageRequest", + "Description": "pagination defines an optional pagination for the request.", + "Required": "No" + } +] diff --git a/source/json_tables/injective/evm/QueryTxLogsResponse.json b/source/json_tables/injective/evm/QueryTxLogsResponse.json new file mode 100644 index 00000000..1384ac1a --- /dev/null +++ b/source/json_tables/injective/evm/QueryTxLogsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "logs", + "Type": "Log array", + "Description": "logs represents the ethereum logs generated from the given transaction." + }, + { + "Parameter": "pagination", + "Type": "query.PageResponse", + "Description": "pagination defines the pagination in the response." + } +] diff --git a/source/json_tables/injective/evm/QueryValidatorAccountRequest.json b/source/json_tables/injective/evm/QueryValidatorAccountRequest.json new file mode 100644 index 00000000..02f20fbf --- /dev/null +++ b/source/json_tables/injective/evm/QueryValidatorAccountRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "cons_address", + "Type": "string", + "Description": "cons_address is the validator cons address to query the account for.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/evm/QueryValidatorAccountResponse.json b/source/json_tables/injective/evm/QueryValidatorAccountResponse.json new file mode 100644 index 00000000..9a367a24 --- /dev/null +++ b/source/json_tables/injective/evm/QueryValidatorAccountResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "account_address is the cosmos address of the account in bech32 format." + }, + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "sequence is the account's sequence number." + }, + { + "Parameter": "account_number", + "Type": "uint64", + "Description": "account_number is the account number" + } +] diff --git a/source/json_tables/injective/evm/State.json b/source/json_tables/injective/evm/State.json new file mode 100644 index 00000000..5da3e68c --- /dev/null +++ b/source/json_tables/injective/evm/State.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "key", + "Type": "string", + "Description": "key is the stored key" + }, + { + "Parameter": "value", + "Type": "string", + "Description": "value is the stored value for the given key" + } +] diff --git a/source/json_tables/injective/evm/TraceConfig.json b/source/json_tables/injective/evm/TraceConfig.json new file mode 100644 index 00000000..f7b351e6 --- /dev/null +++ b/source/json_tables/injective/evm/TraceConfig.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "tracer", + "Type": "string", + "Description": "tracer is a custom javascript tracer" + }, + { + "Parameter": "timeout", + "Type": "string", + "Description": "timeout overrides the default timeout of 5 seconds for JavaScript-based tracing calls" + }, + { + "Parameter": "reexec", + "Type": "uint64", + "Description": "reexec defines the number of blocks the tracer is willing to go back" + }, + { + "Parameter": "disable_stack", + "Type": "bool", + "Description": "disable_stack switches stack capture" + }, + { + "Parameter": "disable_storage", + "Type": "bool", + "Description": "disable_storage switches storage capture" + }, + { + "Parameter": "debug", + "Type": "bool", + "Description": "debug can be used to print output during capture end" + }, + { + "Parameter": "limit", + "Type": "int32", + "Description": "limit defines the maximum length of output, but zero means unlimited" + }, + { + "Parameter": "overrides", + "Type": "ChainConfig", + "Description": "overrides can be used to execute a trace using future fork rules" + }, + { + "Parameter": "enable_memory", + "Type": "bool", + "Description": "enable_memory switches memory capture" + }, + { + "Parameter": "enable_return_data", + "Type": "bool", + "Description": "enable_return_data switches the capture of return data" + }, + { + "Parameter": "tracer_json_config", + "Type": "string", + "Description": "tracer_json_config configures the tracer using a JSON string" + }, + { + "Parameter": "state_overrides", + "Type": "byte array", + "Description": "temporary state modifications to Geth in order to simulate the effects of eth_call" + }, + { + "Parameter": "block_overrides", + "Type": "byte array", + "Description": "block overrides block context fields encoded as json" + } +] diff --git a/source/json_tables/injective/evm/TransactionLogs.json b/source/json_tables/injective/evm/TransactionLogs.json new file mode 100644 index 00000000..1b9cd6b3 --- /dev/null +++ b/source/json_tables/injective/evm/TransactionLogs.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "hash", + "Type": "string", + "Description": "hash of the transaction" + }, + { + "Parameter": "logs", + "Type": "Log array", + "Description": "logs is an array of Logs for the given transaction hash" + } +] diff --git a/source/json_tables/injective/evm/TxResult.json b/source/json_tables/injective/evm/TxResult.json new file mode 100644 index 00000000..ae12c0dd --- /dev/null +++ b/source/json_tables/injective/evm/TxResult.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "contract_address", + "Type": "string", + "Description": "contract_address contains the ethereum address of the created contract (if any). If the state transition is an evm.Call, the contract address will be empty." + }, + { + "Parameter": "bloom", + "Type": "byte array", + "Description": "bloom represents the bloom filter bytes" + }, + { + "Parameter": "tx_logs", + "Type": "TransactionLogs", + "Description": "tx_logs contains the transaction hash and the proto-compatible ethereum logs." + }, + { + "Parameter": "ret", + "Type": "byte array", + "Description": "ret defines the bytes from the execution." + }, + { + "Parameter": "reverted", + "Type": "bool", + "Description": "reverted flag is set to true when the call has been reverted" + }, + { + "Parameter": "gas_used", + "Type": "uint64", + "Description": "gas_used notes the amount of gas consumed while execution" + } +] diff --git a/source/json_tables/injective/exchange/AccountRewards.json b/source/json_tables/injective/exchange/AccountRewards.json new file mode 100644 index 00000000..76655ba0 --- /dev/null +++ b/source/json_tables/injective/exchange/AccountRewards.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/AccountVolume.json b/source/json_tables/injective/exchange/AccountVolume.json new file mode 100644 index 00000000..36aa7fb0 --- /dev/null +++ b/source/json_tables/injective/exchange/AccountVolume.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "volume", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/ActiveGrant.json b/source/json_tables/injective/exchange/ActiveGrant.json new file mode 100644 index 00000000..205af3b9 --- /dev/null +++ b/source/json_tables/injective/exchange/ActiveGrant.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/AdminInfo.json b/source/json_tables/injective/exchange/AdminInfo.json new file mode 100644 index 00000000..33151f36 --- /dev/null +++ b/source/json_tables/injective/exchange/AdminInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "admin", + "Type": "string", + "Description": "" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/AggregateAccountVolumeRecord.json b/source/json_tables/injective/exchange/AggregateAccountVolumeRecord.json new file mode 100644 index 00000000..9c9f0066 --- /dev/null +++ b/source/json_tables/injective/exchange/AggregateAccountVolumeRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_volumes", + "Type": "MarketVolume array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/AggregateSubaccountVolumeRecord.json b/source/json_tables/injective/exchange/AggregateSubaccountVolumeRecord.json new file mode 100644 index 00000000..6b1a4235 --- /dev/null +++ b/source/json_tables/injective/exchange/AggregateSubaccountVolumeRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_volumes", + "Type": "MarketVolume array", + "Description": "the subaccount volumes for each market" + } +] diff --git a/source/json_tables/injective/exchange/AtomicMarketOrderFeeMultiplierScheduleProposal.json b/source/json_tables/injective/exchange/AtomicMarketOrderFeeMultiplierScheduleProposal.json new file mode 100644 index 00000000..ec382d65 --- /dev/null +++ b/source/json_tables/injective/exchange/AtomicMarketOrderFeeMultiplierScheduleProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_fee_multipliers", + "Type": "MarketFeeMultiplier array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/Balance.json b/source/json_tables/injective/exchange/Balance.json new file mode 100644 index 00000000..73b34047 --- /dev/null +++ b/source/json_tables/injective/exchange/Balance.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the balance" + }, + { + "Parameter": "deposits", + "Type": "Deposit", + "Description": "the token deposits details" + } +] diff --git a/source/json_tables/injective/exchange/BalanceMismatch.json b/source/json_tables/injective/exchange/BalanceMismatch.json new file mode 100644 index 00000000..48b0f136 --- /dev/null +++ b/source/json_tables/injective/exchange/BalanceMismatch.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "subaccountId", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the balance" + }, + { + "Parameter": "available", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the available balance" + }, + { + "Parameter": "total", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the total balance" + }, + { + "Parameter": "balance_hold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the balance hold" + }, + { + "Parameter": "expected_total", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the expected total balance" + }, + { + "Parameter": "difference", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the difference between the total balance and the expected total balance" + } +] diff --git a/source/json_tables/injective/exchange/BalanceWithMarginHold.json b/source/json_tables/injective/exchange/BalanceWithMarginHold.json new file mode 100644 index 00000000..1631448e --- /dev/null +++ b/source/json_tables/injective/exchange/BalanceWithMarginHold.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "subaccountId", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the balance" + }, + { + "Parameter": "available", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the available balance" + }, + { + "Parameter": "total", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the total balance" + }, + { + "Parameter": "balance_hold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the balance on hold" + } +] diff --git a/source/json_tables/injective/exchange/BatchCancelDerivativeOrdersAuthz.json b/source/json_tables/injective/exchange/BatchCancelDerivativeOrdersAuthz.json new file mode 100644 index 00000000..2fe75c6e --- /dev/null +++ b/source/json_tables/injective/exchange/BatchCancelDerivativeOrdersAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/BatchCancelSpotOrdersAuthz.json b/source/json_tables/injective/exchange/BatchCancelSpotOrdersAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/BatchCancelSpotOrdersAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/BatchCommunityPoolSpendProposal.json b/source/json_tables/injective/exchange/BatchCommunityPoolSpendProposal.json new file mode 100644 index 00000000..5c9a1f61 --- /dev/null +++ b/source/json_tables/injective/exchange/BatchCommunityPoolSpendProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "proposals", + "Type": "types1.CommunityPoolSpendProposal array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/BatchCreateDerivativeLimitOrdersAuthz.json b/source/json_tables/injective/exchange/BatchCreateDerivativeLimitOrdersAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/BatchCreateDerivativeLimitOrdersAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/BatchCreateSpotLimitOrdersAuthz.json b/source/json_tables/injective/exchange/BatchCreateSpotLimitOrdersAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/BatchCreateSpotLimitOrdersAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/BatchExchangeModificationProposal.json b/source/json_tables/injective/exchange/BatchExchangeModificationProposal.json new file mode 100644 index 00000000..2d4e09cd --- /dev/null +++ b/source/json_tables/injective/exchange/BatchExchangeModificationProposal.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "spot_market_param_update_proposals", + "Type": "SpotMarketParamUpdateProposal array", + "Description": "" + }, + { + "Parameter": "derivative_market_param_update_proposals", + "Type": "DerivativeMarketParamUpdateProposal array", + "Description": "" + }, + { + "Parameter": "spot_market_launch_proposals", + "Type": "SpotMarketLaunchProposal array", + "Description": "" + }, + { + "Parameter": "perpetual_market_launch_proposals", + "Type": "PerpetualMarketLaunchProposal array", + "Description": "" + }, + { + "Parameter": "expiry_futures_market_launch_proposals", + "Type": "ExpiryFuturesMarketLaunchProposal array", + "Description": "" + }, + { + "Parameter": "trading_reward_campaign_update_proposal", + "Type": "TradingRewardCampaignUpdateProposal", + "Description": "" + }, + { + "Parameter": "binary_options_market_launch_proposals", + "Type": "BinaryOptionsMarketLaunchProposal array", + "Description": "" + }, + { + "Parameter": "binary_options_param_update_proposals", + "Type": "BinaryOptionsMarketParamUpdateProposal array", + "Description": "" + }, + { + "Parameter": "denom_decimals_update_proposal", + "Type": "UpdateDenomDecimalsProposal", + "Description": "" + }, + { + "Parameter": "fee_discount_proposal", + "Type": "FeeDiscountProposal", + "Description": "" + }, + { + "Parameter": "market_forced_settlement_proposals", + "Type": "MarketForcedSettlementProposal array", + "Description": "" + }, + { + "Parameter": "denom_min_notional_proposal", + "Type": "DenomMinNotionalProposal", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/BatchUpdateOrdersAuthz.json b/source/json_tables/injective/exchange/BatchUpdateOrdersAuthz.json new file mode 100644 index 00000000..d77ebd7b --- /dev/null +++ b/source/json_tables/injective/exchange/BatchUpdateOrdersAuthz.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "spot_markets", + "Type": "string array", + "Description": "the spot market IDs" + }, + { + "Parameter": "derivative_markets", + "Type": "string array", + "Description": "the derivative market IDs" + } +] diff --git a/source/json_tables/injective/exchange/BinaryOptionsMarket.json b/source/json_tables/injective/exchange/BinaryOptionsMarket.json new file mode 100644 index 00000000..71a455e9 --- /dev/null +++ b/source/json_tables/injective/exchange/BinaryOptionsMarket.json @@ -0,0 +1,102 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative contract." + }, + { + "Parameter": "oracle_symbol", + "Type": "string", + "Description": "Oracle symbol" + }, + { + "Parameter": "oracle_provider", + "Type": "string", + "Description": "Oracle Provider" + }, + { + "Parameter": "oracle_type", + "Type": "types1.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "admin of the market" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Address of the quote currency denomination for the binary options contract" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Unique market ID." + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the maker fee rate of a binary options market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the taker fee rate of a derivative market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the percentage of the transaction fee shared with the relayer in a derivative market" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "Status of the market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price and margin required for orders in the market" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "level of admin permissions" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + } +] diff --git a/source/json_tables/injective/exchange/BinaryOptionsMarketLaunchProposal.json b/source/json_tables/injective/exchange/BinaryOptionsMarketLaunchProposal.json new file mode 100644 index 00000000..d4e35f87 --- /dev/null +++ b/source/json_tables/injective/exchange/BinaryOptionsMarketLaunchProposal.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative contract." + }, + { + "Parameter": "oracle_symbol", + "Type": "string", + "Description": "Oracle symbol" + }, + { + "Parameter": "oracle_provider", + "Type": "string", + "Description": "Oracle Provider" + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "admin of the market" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Address of the quote currency denomination for the binary options contract" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the maker fee rate of a binary options market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the taker fee rate of a derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price and margin required for orders in the market" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/BinaryOptionsMarketParamUpdateProposal.json b/source/json_tables/injective/exchange/BinaryOptionsMarketParamUpdateProposal.json new file mode 100644 index 00000000..c94745ad --- /dev/null +++ b/source/json_tables/injective/exchange/BinaryOptionsMarketParamUpdateProposal.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the exchange trade fee for makers for the derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the exchange trade fee for takers for the derivative market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the relayer fee share rate for the derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "new price at which market will be settled" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "admin of the market" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "" + }, + { + "Parameter": "oracle_params", + "Type": "ProviderOracleParams", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + } +] diff --git a/source/json_tables/injective/exchange/CampaignRewardPool.json b/source/json_tables/injective/exchange/CampaignRewardPool.json new file mode 100644 index 00000000..38f47b04 --- /dev/null +++ b/source/json_tables/injective/exchange/CampaignRewardPool.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "start_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "max_campaign_rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "max_campaign_rewards are the maximum reward amounts to be disbursed at the end of the campaign" + } +] diff --git a/source/json_tables/injective/exchange/CancelDerivativeOrderAuthz.json b/source/json_tables/injective/exchange/CancelDerivativeOrderAuthz.json new file mode 100644 index 00000000..2fe75c6e --- /dev/null +++ b/source/json_tables/injective/exchange/CancelDerivativeOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/CancelSpotOrderAuthz.json b/source/json_tables/injective/exchange/CancelSpotOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/CancelSpotOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/ConditionalDerivativeOrderBook.json b/source/json_tables/injective/exchange/ConditionalDerivativeOrderBook.json new file mode 100644 index 00000000..9b94d379 --- /dev/null +++ b/source/json_tables/injective/exchange/ConditionalDerivativeOrderBook.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "limit_buy_orders", + "Type": "DerivativeLimitOrder array", + "Description": "" + }, + { + "Parameter": "market_buy_orders", + "Type": "DerivativeMarketOrder array", + "Description": "" + }, + { + "Parameter": "limit_sell_orders", + "Type": "DerivativeLimitOrder array", + "Description": "" + }, + { + "Parameter": "market_sell_orders", + "Type": "DerivativeMarketOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/CreateDerivativeLimitOrderAuthz.json b/source/json_tables/injective/exchange/CreateDerivativeLimitOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/CreateDerivativeLimitOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/CreateDerivativeMarketOrderAuthz.json b/source/json_tables/injective/exchange/CreateDerivativeMarketOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/CreateDerivativeMarketOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/CreateSpotLimitOrderAuthz.json b/source/json_tables/injective/exchange/CreateSpotLimitOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/CreateSpotLimitOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/CreateSpotMarketOrderAuthz.json b/source/json_tables/injective/exchange/CreateSpotMarketOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/CreateSpotMarketOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/DenomDecimals.json b/source/json_tables/injective/exchange/DenomDecimals.json new file mode 100644 index 00000000..64ba04c8 --- /dev/null +++ b/source/json_tables/injective/exchange/DenomDecimals.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "decimals", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DenomMinNotional.json b/source/json_tables/injective/exchange/DenomMinNotional.json new file mode 100644 index 00000000..cfaddbd4 --- /dev/null +++ b/source/json_tables/injective/exchange/DenomMinNotional.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the token" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the minimum notional value for the token (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/DenomMinNotionalProposal.json b/source/json_tables/injective/exchange/DenomMinNotionalProposal.json new file mode 100644 index 00000000..c438fe27 --- /dev/null +++ b/source/json_tables/injective/exchange/DenomMinNotionalProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "denom_min_notionals", + "Type": "DenomMinNotional array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/Deposit.json b/source/json_tables/injective/exchange/Deposit.json new file mode 100644 index 00000000..1bd7b124 --- /dev/null +++ b/source/json_tables/injective/exchange/Deposit.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "available_balance", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "total_balance", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DepositUpdate.json b/source/json_tables/injective/exchange/DepositUpdate.json new file mode 100644 index 00000000..0eb82573 --- /dev/null +++ b/source/json_tables/injective/exchange/DepositUpdate.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "deposits", + "Type": "SubaccountDeposit array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeLimitOrder.json b/source/json_tables/injective/exchange/DerivativeLimitOrder.json new file mode 100644 index 00000000..4da1584e --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeLimitOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin is the margin used by the limit order" + }, + { + "Parameter": "fillable", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeMarket.json b/source/json_tables/injective/exchange/DerivativeMarket.json new file mode 100644 index 00000000..ceb83e00 --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeMarket.json @@ -0,0 +1,107 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative contract." + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_type", + "Type": "types1.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Address of the quote currency denomination for the derivative contract" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Unique market ID." + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio of a derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio of a derivative market" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the maker fee rate of a derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the taker fee rate of a derivative market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the percentage of the transaction fee shared with the relayer in a derivative market" + }, + { + "Parameter": "isPerpetual", + "Type": "bool", + "Description": "true if the market is a perpetual market. false if the market is an expiry futures market" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "Status of the market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price and margin required for orders in the market (in chain format)" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market (in chain format)" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market (in chain format)" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "current market admin" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "level of admin permissions" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + }, + { + "Parameter": "reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "reduce_margin_ratio defines the ratio of the margin that is reduced" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeMarketOrder.json b/source/json_tables/injective/exchange/DerivativeMarketOrder.json new file mode 100644 index 00000000..0daaee26 --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeMarketOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "margin_hold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeMarketOrderCancel.json b/source/json_tables/injective/exchange/DerivativeMarketOrderCancel.json new file mode 100644 index 00000000..73e295a9 --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeMarketOrderCancel.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_order", + "Type": "DerivativeMarketOrder", + "Description": "" + }, + { + "Parameter": "cancel_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeMarketOrderResults.json b/source/json_tables/injective/exchange/DerivativeMarketOrderResults.json new file mode 100644 index 00000000..e5ca5362 --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeMarketOrderResults.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "position_delta", + "Type": "PositionDelta", + "Description": "" + }, + { + "Parameter": "payout", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeMarketParamUpdateProposal.json b/source/json_tables/injective/exchange/DerivativeMarketParamUpdateProposal.json new file mode 100644 index 00000000..64b5f435 --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeMarketParamUpdateProposal.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio for the derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio for the derivative market" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the exchange trade fee for makers for the derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the exchange trade fee for takers for the derivative market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the relayer fee share rate for the derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "HourlyInterestRate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_interest_rate defines the hourly interest rate" + }, + { + "Parameter": "HourlyFundingRateCap", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_funding_rate_cap defines the maximum absolute value of the hourly funding rate" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "" + }, + { + "Parameter": "oracle_params", + "Type": "OracleParams", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeMarketSettlementInfo.json b/source/json_tables/injective/exchange/DerivativeMarketSettlementInfo.json new file mode 100644 index 00000000..1669f68a --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeMarketSettlementInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market ID." + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "settlement_price defines the settlement price" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeOrder.json b/source/json_tables/injective/exchange/DerivativeOrder.json new file mode 100644 index 00000000..e949c85d --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeOrder.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market_id represents the unique ID of the market" + }, + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin is the margin used by the limit order" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeOrderBook.json b/source/json_tables/injective/exchange/DerivativeOrderBook.json new file mode 100644 index 00000000..04b0513b --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeOrderBook.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "isBuySide", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "orders", + "Type": "DerivativeLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/DerivativePosition.json b/source/json_tables/injective/exchange/DerivativePosition.json new file mode 100644 index 00000000..8c4a0dd9 --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativePosition.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "position", + "Type": "Position", + "Description": "the position details" + } +] diff --git a/source/json_tables/injective/exchange/DerivativeTradeLog.json b/source/json_tables/injective/exchange/DerivativeTradeLog.json new file mode 100644 index 00000000..0588fa9f --- /dev/null +++ b/source/json_tables/injective/exchange/DerivativeTradeLog.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "position_delta", + "Type": "PositionDelta", + "Description": "" + }, + { + "Parameter": "payout", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "fee_recipient_address", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + }, + { + "Parameter": "pnl", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/EffectiveGrant.json b/source/json_tables/injective/exchange/EffectiveGrant.json new file mode 100644 index 00000000..03e7bd1e --- /dev/null +++ b/source/json_tables/injective/exchange/EffectiveGrant.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "" + }, + { + "Parameter": "net_granted_stake", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "is_valid", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/EffectivePosition.json b/source/json_tables/injective/exchange/EffectivePosition.json new file mode 100644 index 00000000..3be79d52 --- /dev/null +++ b/source/json_tables/injective/exchange/EffectivePosition.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "is_long", + "Type": "bool", + "Description": "whether the position is long or short" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the position (in chain format)" + }, + { + "Parameter": "entry_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the entry price of the position (in chain format)" + }, + { + "Parameter": "effective_margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the effective margin of the position (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/ExchangeEnableProposal.json b/source/json_tables/injective/exchange/ExchangeEnableProposal.json new file mode 100644 index 00000000..313fa7bb --- /dev/null +++ b/source/json_tables/injective/exchange/ExchangeEnableProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "exchangeType", + "Type": "ExchangeType", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/ExpiryFuturesMarketInfo.json b/source/json_tables/injective/exchange/ExpiryFuturesMarketInfo.json new file mode 100644 index 00000000..07d559e0 --- /dev/null +++ b/source/json_tables/injective/exchange/ExpiryFuturesMarketInfo.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market ID." + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration_timestamp defines the expiration time for a time expiry futures market." + }, + { + "Parameter": "twap_start_timestamp", + "Type": "int64", + "Description": "expiration_twap_start_timestamp defines the start time of the TWAP calculation window" + }, + { + "Parameter": "expiration_twap_start_price_cumulative", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "expiration_twap_start_price_cumulative defines the cumulative price for the start of the TWAP window (in chain format)" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "settlement_price defines the settlement price for a time expiry futures market (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/ExpiryFuturesMarketInfoState.json b/source/json_tables/injective/exchange/ExpiryFuturesMarketInfoState.json new file mode 100644 index 00000000..81e22009 --- /dev/null +++ b/source/json_tables/injective/exchange/ExpiryFuturesMarketInfoState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_info", + "Type": "ExpiryFuturesMarketInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/ExpiryFuturesMarketLaunchProposal.json b/source/json_tables/injective/exchange/ExpiryFuturesMarketLaunchProposal.json new file mode 100644 index 00000000..5db2c134 --- /dev/null +++ b/source/json_tables/injective/exchange/ExpiryFuturesMarketLaunchProposal.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative market." + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the quote currency" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "expiry", + "Type": "int64", + "Description": "Expiration time of the market" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio for the derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio for the derivative market" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the exchange trade fee for makers for the derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the exchange trade fee for takers for the derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/FeeDiscountAccountTierTTL.json b/source/json_tables/injective/exchange/FeeDiscountAccountTierTTL.json new file mode 100644 index 00000000..708c0adc --- /dev/null +++ b/source/json_tables/injective/exchange/FeeDiscountAccountTierTTL.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "tier_ttl", + "Type": "FeeDiscountTierTTL", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/FeeDiscountBucketVolumeAccounts.json b/source/json_tables/injective/exchange/FeeDiscountBucketVolumeAccounts.json new file mode 100644 index 00000000..400a652c --- /dev/null +++ b/source/json_tables/injective/exchange/FeeDiscountBucketVolumeAccounts.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "bucket_start_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "account_volume", + "Type": "AccountVolume array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/FeeDiscountProposal.json b/source/json_tables/injective/exchange/FeeDiscountProposal.json new file mode 100644 index 00000000..5c19b391 --- /dev/null +++ b/source/json_tables/injective/exchange/FeeDiscountProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "schedule", + "Type": "FeeDiscountSchedule", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/FeeDiscountSchedule.json b/source/json_tables/injective/exchange/FeeDiscountSchedule.json new file mode 100644 index 00000000..32b38a6d --- /dev/null +++ b/source/json_tables/injective/exchange/FeeDiscountSchedule.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "bucket_count", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "bucket_duration", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "quote_denoms", + "Type": "string array", + "Description": "the trading fee quote denoms which will be counted for the fee paid contribution" + }, + { + "Parameter": "tier_infos", + "Type": "FeeDiscountTierInfo array", + "Description": "the fee discount tiers" + }, + { + "Parameter": "disqualified_market_ids", + "Type": "string array", + "Description": "the marketIDs which are disqualified from contributing to the fee paid amount" + } +] diff --git a/source/json_tables/injective/exchange/FeeDiscountTierInfo.json b/source/json_tables/injective/exchange/FeeDiscountTierInfo.json new file mode 100644 index 00000000..5e37c45d --- /dev/null +++ b/source/json_tables/injective/exchange/FeeDiscountTierInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "maker_discount_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the maker discount rate" + }, + { + "Parameter": "taker_discount_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the taker discount rate" + }, + { + "Parameter": "staked_amount", + "Type": "cosmossdk_io_math.Int", + "Description": "the staked amount required to qualify for the discount (in chain format)" + }, + { + "Parameter": "volume", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the volume required to qualify for the discount (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/FeeDiscountTierTTL.json b/source/json_tables/injective/exchange/FeeDiscountTierTTL.json new file mode 100644 index 00000000..036aaef6 --- /dev/null +++ b/source/json_tables/injective/exchange/FeeDiscountTierTTL.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "tier", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "ttl_timestamp", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/FullActiveGrant.json b/source/json_tables/injective/exchange/FullActiveGrant.json new file mode 100644 index 00000000..f5aa37c4 --- /dev/null +++ b/source/json_tables/injective/exchange/FullActiveGrant.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "grantee", + "Type": "string", + "Description": "" + }, + { + "Parameter": "active_grant", + "Type": "ActiveGrant", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/FullDerivativeMarket.json b/source/json_tables/injective/exchange/FullDerivativeMarket.json new file mode 100644 index 00000000..3a267b47 --- /dev/null +++ b/source/json_tables/injective/exchange/FullDerivativeMarket.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market", + "Type": "DerivativeMarket", + "Description": "derivative market details" + }, + { + "Parameter": "mark_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "mark price (in chain format)" + }, + { + "Parameter": "mid_price_and_tob", + "Type": "MidPriceAndTOB", + "Description": "mid_price_and_tob defines the mid price for this market and the best ask and bid orders" + }, + { + "Parameter": "perpetual_info", + "Type": "PerpetualMarketState", + "Description": "" + }, + { + "Parameter": "futures_info", + "Type": "ExpiryFuturesMarketInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/FullGrantAuthorizations.json b/source/json_tables/injective/exchange/FullGrantAuthorizations.json new file mode 100644 index 00000000..a13c7858 --- /dev/null +++ b/source/json_tables/injective/exchange/FullGrantAuthorizations.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "" + }, + { + "Parameter": "total_grant_amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "last_delegations_checked_time", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "grants", + "Type": "GrantAuthorization array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/FullSpotMarket.json b/source/json_tables/injective/exchange/FullSpotMarket.json new file mode 100644 index 00000000..3f818d40 --- /dev/null +++ b/source/json_tables/injective/exchange/FullSpotMarket.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market", + "Type": "SpotMarket", + "Description": "" + }, + { + "Parameter": "mid_price_and_tob", + "Type": "MidPriceAndTOB", + "Description": "mid_price_and_tob defines the mid price for this market and the best ask and bid orders" + } +] diff --git a/source/json_tables/injective/exchange/GenericExchangeAuthorization.json b/source/json_tables/injective/exchange/GenericExchangeAuthorization.json new file mode 100644 index 00000000..0b497d37 --- /dev/null +++ b/source/json_tables/injective/exchange/GenericExchangeAuthorization.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "msg", + "Type": "string", + "Description": "Msg, identified by it's type URL, to grant permissions to the grantee" + }, + { + "Parameter": "spend_limit", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "SpendLimit is the maximum amount of tokens that the grantee can spend on behalf of the granter. If not set, there is no spend limit." + } +] diff --git a/source/json_tables/injective/exchange/GenesisState.json b/source/json_tables/injective/exchange/GenesisState.json new file mode 100644 index 00000000..c7e3201c --- /dev/null +++ b/source/json_tables/injective/exchange/GenesisState.json @@ -0,0 +1,187 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of related to exchange." + }, + { + "Parameter": "spot_markets", + "Type": "SpotMarket array", + "Description": "spot_markets is an array containing the genesis trade pairs" + }, + { + "Parameter": "derivative_markets", + "Type": "DerivativeMarket array", + "Description": "derivative_markets is an array containing the genesis derivative markets" + }, + { + "Parameter": "spot_orderbook", + "Type": "SpotOrderBook array", + "Description": "spot_orderbook defines the spot exchange limit orderbook active at genesis." + }, + { + "Parameter": "derivative_orderbook", + "Type": "DerivativeOrderBook array", + "Description": "derivative_orderbook defines the derivative exchange limit orderbook active at genesis." + }, + { + "Parameter": "balances", + "Type": "Balance array", + "Description": "balances defines the exchange users balances active at genesis." + }, + { + "Parameter": "positions", + "Type": "DerivativePosition array", + "Description": "positions defines the exchange derivative positions at genesis" + }, + { + "Parameter": "subaccount_trade_nonces", + "Type": "SubaccountNonce array", + "Description": "subaccount_trade_nonces defines the subaccount trade nonces for the subaccounts at genesis" + }, + { + "Parameter": "expiry_futures_market_info_state", + "Type": "ExpiryFuturesMarketInfoState array", + "Description": "expiry_futures_market_info defines the market info for the expiry futures markets at genesis" + }, + { + "Parameter": "perpetual_market_info", + "Type": "PerpetualMarketInfo array", + "Description": "perpetual_market_info defines the market info for the perpetual derivative markets at genesis" + }, + { + "Parameter": "perpetual_market_funding_state", + "Type": "PerpetualMarketFundingState array", + "Description": "perpetual_market_funding_state defines the funding state for the perpetual derivative markets at genesis" + }, + { + "Parameter": "derivative_market_settlement_scheduled", + "Type": "DerivativeMarketSettlementInfo array", + "Description": "derivative_market_settlement_scheduled defines the scheduled markets for settlement at genesis" + }, + { + "Parameter": "is_spot_exchange_enabled", + "Type": "bool", + "Description": "sets spot markets as enabled" + }, + { + "Parameter": "is_derivatives_exchange_enabled", + "Type": "bool", + "Description": "sets derivative markets as enabled" + }, + { + "Parameter": "trading_reward_campaign_info", + "Type": "TradingRewardCampaignInfo", + "Description": "the current trading reward campaign info" + }, + { + "Parameter": "trading_reward_pool_campaign_schedule", + "Type": "CampaignRewardPool array", + "Description": "the current and upcoming trading reward campaign pools" + }, + { + "Parameter": "trading_reward_campaign_account_points", + "Type": "TradingRewardCampaignAccountPoints array", + "Description": "the current trading reward account points" + }, + { + "Parameter": "fee_discount_schedule", + "Type": "FeeDiscountSchedule", + "Description": "the fee discount schedule" + }, + { + "Parameter": "fee_discount_account_tier_ttl", + "Type": "FeeDiscountAccountTierTTL array", + "Description": "the cached fee discount account tiers with TTL" + }, + { + "Parameter": "fee_discount_bucket_volume_accounts", + "Type": "FeeDiscountBucketVolumeAccounts array", + "Description": "the fee discount paid by accounts in all buckets" + }, + { + "Parameter": "is_first_fee_cycle_finished", + "Type": "bool", + "Description": "sets the first fee cycle as finished" + }, + { + "Parameter": "pending_trading_reward_pool_campaign_schedule", + "Type": "CampaignRewardPool array", + "Description": "the current and upcoming trading reward campaign pending pools" + }, + { + "Parameter": "pending_trading_reward_campaign_account_points", + "Type": "TradingRewardCampaignAccountPendingPoints array", + "Description": "the pending trading reward account points" + }, + { + "Parameter": "rewards_opt_out_addresses", + "Type": "string array", + "Description": "the addresses opting out of trading rewards" + }, + { + "Parameter": "historical_trade_records", + "Type": "TradeRecords array", + "Description": "" + }, + { + "Parameter": "binary_options_markets", + "Type": "BinaryOptionsMarket array", + "Description": "binary_options_markets is an array containing the genesis binary options markets" + }, + { + "Parameter": "binary_options_market_ids_scheduled_for_settlement", + "Type": "string array", + "Description": "binary_options_markets_scheduled_for_settlement contains the marketIDs of binary options markets scheduled for next-block settlement" + }, + { + "Parameter": "spot_market_ids_scheduled_to_force_close", + "Type": "string array", + "Description": "spot_market_ids_scheduled_to_force_close defines the scheduled markets for forced closings at genesis" + }, + { + "Parameter": "denom_decimals", + "Type": "DenomDecimals array", + "Description": "denom_decimals defines the denom decimals for the exchange." + }, + { + "Parameter": "conditional_derivative_orderbooks", + "Type": "ConditionalDerivativeOrderBook array", + "Description": "conditional_derivative_orderbook contains conditional orderbooks for all markets (both lmit and market conditional orders)" + }, + { + "Parameter": "market_fee_multipliers", + "Type": "MarketFeeMultiplier array", + "Description": "market_fee_multipliers contains any non-default atomic order fee multipliers" + }, + { + "Parameter": "orderbook_sequences", + "Type": "OrderbookSequence array", + "Description": "" + }, + { + "Parameter": "subaccount_volumes", + "Type": "AggregateSubaccountVolumeRecord array", + "Description": "" + }, + { + "Parameter": "market_volumes", + "Type": "MarketVolume array", + "Description": "" + }, + { + "Parameter": "grant_authorizations", + "Type": "FullGrantAuthorizations array", + "Description": "" + }, + { + "Parameter": "active_grants", + "Type": "FullActiveGrant array", + "Description": "" + }, + { + "Parameter": "denom_min_notionals", + "Type": "DenomMinNotional array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/GrantAuthorization.json b/source/json_tables/injective/exchange/GrantAuthorization.json new file mode 100644 index 00000000..b57855b4 --- /dev/null +++ b/source/json_tables/injective/exchange/GrantAuthorization.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "grantee", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/Level.json b/source/json_tables/injective/exchange/Level.json new file mode 100644 index 00000000..e26a9c58 --- /dev/null +++ b/source/json_tables/injective/exchange/Level.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "p", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price (in chain format)" + }, + { + "Parameter": "q", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/MarketBalance.json b/source/json_tables/injective/exchange/MarketBalance.json new file mode 100644 index 00000000..459041a8 --- /dev/null +++ b/source/json_tables/injective/exchange/MarketBalance.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "balance", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MarketFeeMultiplier.json b/source/json_tables/injective/exchange/MarketFeeMultiplier.json new file mode 100644 index 00000000..fe282927 --- /dev/null +++ b/source/json_tables/injective/exchange/MarketFeeMultiplier.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MarketForcedSettlementProposal.json b/source/json_tables/injective/exchange/MarketForcedSettlementProposal.json new file mode 100644 index 00000000..7872f360 --- /dev/null +++ b/source/json_tables/injective/exchange/MarketForcedSettlementProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MarketOrderIndicator.json b/source/json_tables/injective/exchange/MarketOrderIndicator.json new file mode 100644 index 00000000..9d3176b9 --- /dev/null +++ b/source/json_tables/injective/exchange/MarketOrderIndicator.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market_id represents the unique ID of the market" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MarketVolume.json b/source/json_tables/injective/exchange/MarketVolume.json new file mode 100644 index 00000000..7c9f4394 --- /dev/null +++ b/source/json_tables/injective/exchange/MarketVolume.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "volume", + "Type": "VolumeRecord", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MidPriceAndTOB.json b/source/json_tables/injective/exchange/MidPriceAndTOB.json new file mode 100644 index 00000000..4b9b723d --- /dev/null +++ b/source/json_tables/injective/exchange/MidPriceAndTOB.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "mid_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "mid price of the market (in chain format)" + }, + { + "Parameter": "best_buy_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best buy price of the market (in chain format)" + }, + { + "Parameter": "best_sell_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best sell price of the market (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/MitoVaultInfosResponse.json b/source/json_tables/injective/exchange/MitoVaultInfosResponse.json new file mode 100644 index 00000000..110acdd2 --- /dev/null +++ b/source/json_tables/injective/exchange/MitoVaultInfosResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "master_addresses", + "Type": "string array", + "Description": "list of master addresses" + }, + { + "Parameter": "derivative_addresses", + "Type": "string array", + "Description": "list of derivative addresses" + }, + { + "Parameter": "spot_addresses", + "Type": "string array", + "Description": "list of spot addresses" + }, + { + "Parameter": "cw20_addresses", + "Type": "string array", + "Description": "list of cw20 addresses" + } +] diff --git a/source/json_tables/injective/exchange/MsgActivateStakeGrant.json b/source/json_tables/injective/exchange/MsgActivateStakeGrant.json new file mode 100644 index 00000000..36190ff7 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgActivateStakeGrant.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "granter", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgAdminUpdateBinaryOptionsMarket.json b/source/json_tables/injective/exchange/MsgAdminUpdateBinaryOptionsMarket.json new file mode 100644 index 00000000..ee706109 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgAdminUpdateBinaryOptionsMarket.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "new price at which market will be settled", + "Required": "No" + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp", + "Required": "Yes" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp", + "Required": "Yes" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "Status of the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgAuthorizeStakeGrants.json b/source/json_tables/injective/exchange/MsgAuthorizeStakeGrants.json new file mode 100644 index 00000000..126daecb --- /dev/null +++ b/source/json_tables/injective/exchange/MsgAuthorizeStakeGrants.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "grants", + "Type": "GrantAuthorization array", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCancelBinaryOptionsOrders.json b/source/json_tables/injective/exchange/MsgBatchCancelBinaryOptionsOrders.json new file mode 100644 index 00000000..c482900d --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCancelBinaryOptionsOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "OrderData array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCancelBinaryOptionsOrdersResponse.json b/source/json_tables/injective/exchange/MsgBatchCancelBinaryOptionsOrdersResponse.json new file mode 100644 index 00000000..bf514378 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCancelBinaryOptionsOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCancelDerivativeOrders.json b/source/json_tables/injective/exchange/MsgBatchCancelDerivativeOrders.json new file mode 100644 index 00000000..10583c17 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCancelDerivativeOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "OrderData array", + "Description": "orders details", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCancelDerivativeOrdersResponse.json b/source/json_tables/injective/exchange/MsgBatchCancelDerivativeOrdersResponse.json new file mode 100644 index 00000000..bf514378 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCancelDerivativeOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCancelSpotOrders.json b/source/json_tables/injective/exchange/MsgBatchCancelSpotOrders.json new file mode 100644 index 00000000..c482900d --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCancelSpotOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "OrderData array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCancelSpotOrdersResponse.json b/source/json_tables/injective/exchange/MsgBatchCancelSpotOrdersResponse.json new file mode 100644 index 00000000..bf514378 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCancelSpotOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCreateDerivativeLimitOrders.json b/source/json_tables/injective/exchange/MsgBatchCreateDerivativeLimitOrders.json new file mode 100644 index 00000000..39bb1d78 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCreateDerivativeLimitOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orders", + "Type": "DerivativeOrder array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCreateDerivativeLimitOrdersResponse.json b/source/json_tables/injective/exchange/MsgBatchCreateDerivativeLimitOrdersResponse.json new file mode 100644 index 00000000..4e84fa8d --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCreateDerivativeLimitOrdersResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_orders_cids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCreateSpotLimitOrders.json b/source/json_tables/injective/exchange/MsgBatchCreateSpotLimitOrders.json new file mode 100644 index 00000000..85bd91c6 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCreateSpotLimitOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "orders", + "Type": "SpotOrder array", + "Description": "the spot orders details", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchCreateSpotLimitOrdersResponse.json b/source/json_tables/injective/exchange/MsgBatchCreateSpotLimitOrdersResponse.json new file mode 100644 index 00000000..e5e969bd --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchCreateSpotLimitOrdersResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hashes", + "Type": "string array", + "Description": "the order hashes" + }, + { + "Parameter": "created_orders_cids", + "Type": "string array", + "Description": "the client order IDs" + }, + { + "Parameter": "failed_orders_cids", + "Type": "string array", + "Description": "the failed client order IDs" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchExchangeModification.json b/source/json_tables/injective/exchange/MsgBatchExchangeModification.json new file mode 100644 index 00000000..357d491d --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchExchangeModification.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "BatchExchangeModificationProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchUpdateOrders.json b/source/json_tables/injective/exchange/MsgBatchUpdateOrders.json new file mode 100644 index 00000000..4862e9fe --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchUpdateOrders.json @@ -0,0 +1,68 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID only used for the spot_market_ids_to_cancel_all and derivative_market_ids_to_cancel_all", + "Required": "Yes" + }, + { + "Parameter": "spot_market_ids_to_cancel_all", + "Type": "string array", + "Description": "the spot market IDs to cancel all", + "Required": "Yes" + }, + { + "Parameter": "derivative_market_ids_to_cancel_all", + "Type": "string array", + "Description": "the derivative market IDs to cancel all", + "Required": "Yes" + }, + { + "Parameter": "spot_orders_to_cancel", + "Type": "OrderData array", + "Description": "the spot orders to cancel", + "Required": "No" + }, + { + "Parameter": "derivative_orders_to_cancel", + "Type": "OrderData array", + "Description": "the derivative orders to cancel", + "Required": "No" + }, + { + "Parameter": "spot_orders_to_create", + "Type": "SpotOrder array", + "Description": "the spot orders to create", + "Required": "No" + }, + { + "Parameter": "derivative_orders_to_create", + "Type": "DerivativeOrder array", + "Description": "the derivative orders to create", + "Required": "No" + }, + { + "Parameter": "binary_options_orders_to_cancel", + "Type": "OrderData array", + "Description": "the binary options orders to cancel", + "Required": "No" + }, + { + "Parameter": "binary_options_market_ids_to_cancel_all", + "Type": "string array", + "Description": "the binary options market IDs to cancel all", + "Required": "Yes" + }, + { + "Parameter": "binary_options_orders_to_create", + "Type": "DerivativeOrder array", + "Description": "the binary options orders to create", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/MsgBatchUpdateOrdersResponse.json b/source/json_tables/injective/exchange/MsgBatchUpdateOrdersResponse.json new file mode 100644 index 00000000..51f2b585 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgBatchUpdateOrdersResponse.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "spot_cancel_success", + "Type": "bool array", + "Description": "" + }, + { + "Parameter": "derivative_cancel_success", + "Type": "bool array", + "Description": "" + }, + { + "Parameter": "spot_order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "derivative_order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "binary_options_cancel_success", + "Type": "bool array", + "Description": "" + }, + { + "Parameter": "binary_options_order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_spot_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_spot_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_derivative_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_derivative_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_binary_options_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_binary_options_orders_cids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgCancelBinaryOptionsOrder.json b/source/json_tables/injective/exchange/MsgCancelBinaryOptionsOrder.json new file mode 100644 index 00000000..b08d205e --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCancelBinaryOptionsOrder.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash", + "Required": "Yes" + }, + { + "Parameter": "order_mask", + "Type": "int32", + "Description": "the order mask (bitwise combination of OrderMask enum values)", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCancelDerivativeOrder.json b/source/json_tables/injective/exchange/MsgCancelDerivativeOrder.json new file mode 100644 index 00000000..9bf7fc13 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCancelDerivativeOrder.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash", + "Required": "Yes" + }, + { + "Parameter": "order_mask", + "Type": "int32", + "Description": "the order mask", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCancelSpotOrder.json b/source/json_tables/injective/exchange/MsgCancelSpotOrder.json new file mode 100644 index 00000000..2c030a37 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCancelSpotOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateBinaryOptionsLimitOrder.json b/source/json_tables/injective/exchange/MsgCreateBinaryOptionsLimitOrder.json new file mode 100644 index 00000000..7055b241 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateBinaryOptionsLimitOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateBinaryOptionsLimitOrderResponse.json b/source/json_tables/injective/exchange/MsgCreateBinaryOptionsLimitOrderResponse.json new file mode 100644 index 00000000..54de12eb --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateBinaryOptionsLimitOrderResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateBinaryOptionsMarketOrder.json b/source/json_tables/injective/exchange/MsgCreateBinaryOptionsMarketOrder.json new file mode 100644 index 00000000..7055b241 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateBinaryOptionsMarketOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateBinaryOptionsMarketOrderResponse.json b/source/json_tables/injective/exchange/MsgCreateBinaryOptionsMarketOrderResponse.json new file mode 100644 index 00000000..44aa9ae1 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateBinaryOptionsMarketOrderResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "results", + "Type": "DerivativeMarketOrderResults", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateDerivativeLimitOrder.json b/source/json_tables/injective/exchange/MsgCreateDerivativeLimitOrder.json new file mode 100644 index 00000000..7055b241 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateDerivativeLimitOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateDerivativeLimitOrderResponse.json b/source/json_tables/injective/exchange/MsgCreateDerivativeLimitOrderResponse.json new file mode 100644 index 00000000..54de12eb --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateDerivativeLimitOrderResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateDerivativeMarketOrder.json b/source/json_tables/injective/exchange/MsgCreateDerivativeMarketOrder.json new file mode 100644 index 00000000..7055b241 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateDerivativeMarketOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateDerivativeMarketOrderResponse.json b/source/json_tables/injective/exchange/MsgCreateDerivativeMarketOrderResponse.json new file mode 100644 index 00000000..44aa9ae1 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateDerivativeMarketOrderResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "results", + "Type": "DerivativeMarketOrderResults", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateSpotLimitOrder.json b/source/json_tables/injective/exchange/MsgCreateSpotLimitOrder.json new file mode 100644 index 00000000..4e412b6d --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateSpotLimitOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "SpotOrder", + "Description": "the spot order to create", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateSpotLimitOrderResponse.json b/source/json_tables/injective/exchange/MsgCreateSpotLimitOrderResponse.json new file mode 100644 index 00000000..8ffcf67e --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateSpotLimitOrderResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateSpotMarketOrder.json b/source/json_tables/injective/exchange/MsgCreateSpotMarketOrder.json new file mode 100644 index 00000000..68c462a7 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateSpotMarketOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "SpotOrder", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgCreateSpotMarketOrderResponse.json b/source/json_tables/injective/exchange/MsgCreateSpotMarketOrderResponse.json new file mode 100644 index 00000000..a6cfe812 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgCreateSpotMarketOrderResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "results", + "Type": "SpotMarketOrderResults", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgDecreasePositionMargin.json b/source/json_tables/injective/exchange/MsgDecreasePositionMargin.json new file mode 100644 index 00000000..99f437ae --- /dev/null +++ b/source/json_tables/injective/exchange/MsgDecreasePositionMargin.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "source_subaccount_id", + "Type": "string", + "Description": "the subaccount ID sending the funds", + "Required": "Yes" + }, + { + "Parameter": "destination_subaccount_id", + "Type": "string", + "Description": "the subaccount ID the position belongs to", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "amount defines the amount of margin to withdraw from the position (in chain format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgDeposit.json b/source/json_tables/injective/exchange/MsgDeposit.json new file mode 100644 index 00000000..ca41c342 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgDeposit.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "(Optional) bytes32 subaccount ID to deposit funds into. If empty, the coin will be deposited to the sender's default subaccount address", + "Required": "No" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "the amount of the deposit (in chain format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgEmergencySettleMarket.json b/source/json_tables/injective/exchange/MsgEmergencySettleMarket.json new file mode 100644 index 00000000..4f961683 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgEmergencySettleMarket.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgExternalTransfer.json b/source/json_tables/injective/exchange/MsgExternalTransfer.json new file mode 100644 index 00000000..9772bfad --- /dev/null +++ b/source/json_tables/injective/exchange/MsgExternalTransfer.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "source_subaccount_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "destination_subaccount_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgIncreasePositionMargin.json b/source/json_tables/injective/exchange/MsgIncreasePositionMargin.json new file mode 100644 index 00000000..b9d7255d --- /dev/null +++ b/source/json_tables/injective/exchange/MsgIncreasePositionMargin.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "source_subaccount_id", + "Type": "string", + "Description": "the subaccount ID sending the funds", + "Required": "Yes" + }, + { + "Parameter": "destination_subaccount_id", + "Type": "string", + "Description": "the subaccount ID the position belongs to", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "amount defines the amount of margin to add to the position (in chain format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgInstantBinaryOptionsMarketLaunch.json b/source/json_tables/injective/exchange/MsgInstantBinaryOptionsMarketLaunch.json new file mode 100644 index 00000000..64e25dbb --- /dev/null +++ b/source/json_tables/injective/exchange/MsgInstantBinaryOptionsMarketLaunch.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "the ticker for the derivative contract", + "Required": "Yes" + }, + { + "Parameter": "oracle_symbol", + "Type": "string", + "Description": "the oracle symbol", + "Required": "Yes" + }, + { + "Parameter": "oracle_provider", + "Type": "string", + "Description": "the oracle provider", + "Required": "Yes" + }, + { + "Parameter": "oracle_type", + "Type": "types1.OracleType", + "Description": "Oracle type", + "Required": "Yes" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices.", + "Required": "Yes" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the trade fee rate for makers on the perpetual market", + "Required": "Yes" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the trade fee rate for takers on the perpetual market", + "Required": "Yes" + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp", + "Required": "Yes" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp", + "Required": "Yes" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "admin of the market", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Address of the quote currency denomination for the binary options contract", + "Required": "Yes" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price and margin required for orders in the market", + "Required": "Yes" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market", + "Required": "Yes" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgInstantSpotMarketLaunch.json b/source/json_tables/injective/exchange/MsgInstantSpotMarketLaunch.json new file mode 100644 index 00000000..2fdac99a --- /dev/null +++ b/source/json_tables/injective/exchange/MsgInstantSpotMarketLaunch.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "the ticker for the spot market", + "Required": "Yes" + }, + { + "Parameter": "base_denom", + "Type": "string", + "Description": "the type of coin to use as the base currency", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the quote currency", + "Required": "Yes" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price", + "Required": "Yes" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity", + "Required": "Yes" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market", + "Required": "Yes" + }, + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "base token decimals", + "Required": "Yes" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgLiquidatePosition.json b/source/json_tables/injective/exchange/MsgLiquidatePosition.json new file mode 100644 index 00000000..6867c9a3 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgLiquidatePosition.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "optional order to provide for liquidation", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/MsgPrivilegedExecuteContract.json b/source/json_tables/injective/exchange/MsgPrivilegedExecuteContract.json new file mode 100644 index 00000000..320397ee --- /dev/null +++ b/source/json_tables/injective/exchange/MsgPrivilegedExecuteContract.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "funds", + "Type": "string", + "Description": "funds defines the user's bank coins used to fund the execution (e.g. 100inj).", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "contract_address defines the contract address to execute", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "string", + "Description": "data defines the call data used when executing the contract", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgPrivilegedExecuteContractResponse.json b/source/json_tables/injective/exchange/MsgPrivilegedExecuteContractResponse.json new file mode 100644 index 00000000..65f26fd9 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgPrivilegedExecuteContractResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "funds_diff", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/MsgReclaimLockedFunds.json b/source/json_tables/injective/exchange/MsgReclaimLockedFunds.json new file mode 100644 index 00000000..c9429572 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgReclaimLockedFunds.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "lockedAccountPubKey", + "Type": "byte array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "signature", + "Type": "byte array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgRewardsOptOut.json b/source/json_tables/injective/exchange/MsgRewardsOptOut.json new file mode 100644 index 00000000..8c50ab22 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgRewardsOptOut.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgSignData.json b/source/json_tables/injective/exchange/MsgSignData.json new file mode 100644 index 00000000..54002345 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgSignData.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "Signer", + "Type": "github_com_cosmos_cosmos_sdk_types.AccAddress", + "Description": "Signer is the sdk.AccAddress of the message signer", + "Required": "Yes" + }, + { + "Parameter": "Data", + "Type": "byte array", + "Description": "Data represents the raw bytes of the content that is signed (text, json, etc)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgSignDoc.json b/source/json_tables/injective/exchange/MsgSignDoc.json new file mode 100644 index 00000000..164c733a --- /dev/null +++ b/source/json_tables/injective/exchange/MsgSignDoc.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sign_type", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "value", + "Type": "MsgSignData", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgSubaccountTransfer.json b/source/json_tables/injective/exchange/MsgSubaccountTransfer.json new file mode 100644 index 00000000..b36215dc --- /dev/null +++ b/source/json_tables/injective/exchange/MsgSubaccountTransfer.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "source_subaccount_id", + "Type": "string", + "Description": "the source subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "destination_subaccount_id", + "Type": "string", + "Description": "the destination subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "the amount of the transfer", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgUpdateDerivativeMarket.json b/source/json_tables/injective/exchange/MsgUpdateDerivativeMarket.json new file mode 100644 index 00000000..da8b8900 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgUpdateDerivativeMarket.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "admin", + "Type": "string", + "Description": "current admin address of the associated market", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "id of the market to be updated", + "Required": "Yes" + }, + { + "Parameter": "new_ticker", + "Type": "string", + "Description": "(optional) updated value for ticker", + "Required": "No" + }, + { + "Parameter": "new_min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value for min_price_tick_size", + "Required": "No" + }, + { + "Parameter": "new_min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value min_quantity_tick_size", + "Required": "No" + }, + { + "Parameter": "new_min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated min notional", + "Required": "No" + }, + { + "Parameter": "new_initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value for initial_margin_ratio", + "Required": "No" + }, + { + "Parameter": "new_maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value for maintenance_margin_ratio", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/MsgUpdateParams.json b/source/json_tables/injective/exchange/MsgUpdateParams.json new file mode 100644 index 00000000..4776bb94 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the exchange parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/MsgUpdateSpotMarket.json b/source/json_tables/injective/exchange/MsgUpdateSpotMarket.json new file mode 100644 index 00000000..f5f875ab --- /dev/null +++ b/source/json_tables/injective/exchange/MsgUpdateSpotMarket.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "admin", + "Type": "string", + "Description": "current admin address of the associated market", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "id of the market to be updated", + "Required": "Yes" + }, + { + "Parameter": "new_ticker", + "Type": "string", + "Description": "(optional) updated ticker value", + "Required": "No" + }, + { + "Parameter": "new_min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated min price tick size value", + "Required": "No" + }, + { + "Parameter": "new_min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated min quantity tick size value", + "Required": "No" + }, + { + "Parameter": "new_min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated min notional", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/MsgWithdraw.json b/source/json_tables/injective/exchange/MsgWithdraw.json new file mode 100644 index 00000000..4d1bdc44 --- /dev/null +++ b/source/json_tables/injective/exchange/MsgWithdraw.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID to withdraw funds from", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "the amount of the withdrawal (in chain format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/NextFundingTimestamp.json b/source/json_tables/injective/exchange/NextFundingTimestamp.json new file mode 100644 index 00000000..cc60cabd --- /dev/null +++ b/source/json_tables/injective/exchange/NextFundingTimestamp.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "next_timestamp", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/OracleParams.json b/source/json_tables/injective/exchange/OracleParams.json new file mode 100644 index 00000000..a719913c --- /dev/null +++ b/source/json_tables/injective/exchange/OracleParams.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + } +] diff --git a/source/json_tables/injective/exchange/OrderData.json b/source/json_tables/injective/exchange/OrderData.json new file mode 100644 index 00000000..02ad0709 --- /dev/null +++ b/source/json_tables/injective/exchange/OrderData.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "order_mask", + "Type": "int32", + "Description": "the order mask (bitwise combination of OrderMask enum values)" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID" + } +] diff --git a/source/json_tables/injective/exchange/OrderInfo.json b/source/json_tables/injective/exchange/OrderInfo.json new file mode 100644 index 00000000..76598691 --- /dev/null +++ b/source/json_tables/injective/exchange/OrderInfo.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "bytes32 subaccount ID that created the order" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "address fee_recipient address that will receive fees for the order" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/Orderbook.json b/source/json_tables/injective/exchange/Orderbook.json new file mode 100644 index 00000000..4fa22ef2 --- /dev/null +++ b/source/json_tables/injective/exchange/Orderbook.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "buy_levels", + "Type": "Level array", + "Description": "" + }, + { + "Parameter": "sell_levels", + "Type": "Level array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/OrderbookSequence.json b/source/json_tables/injective/exchange/OrderbookSequence.json new file mode 100644 index 00000000..96a9c666 --- /dev/null +++ b/source/json_tables/injective/exchange/OrderbookSequence.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/OrderbookUpdate.json b/source/json_tables/injective/exchange/OrderbookUpdate.json new file mode 100644 index 00000000..cf5118cf --- /dev/null +++ b/source/json_tables/injective/exchange/OrderbookUpdate.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "seq", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "orderbook", + "Type": "Orderbook", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/Params.json b/source/json_tables/injective/exchange/Params.json new file mode 100644 index 00000000..bcb19690 --- /dev/null +++ b/source/json_tables/injective/exchange/Params.json @@ -0,0 +1,147 @@ +[ + { + "Parameter": "spot_market_instant_listing_fee", + "Type": "types.Coin", + "Description": "spot_market_instant_listing_fee defines the expedited fee in INJ required to create a spot market by bypassing governance" + }, + { + "Parameter": "derivative_market_instant_listing_fee", + "Type": "types.Coin", + "Description": "derivative_market_instant_listing_fee defines the expedited fee in INJ required to create a derivative market by bypassing governance" + }, + { + "Parameter": "default_spot_maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_spot_maker_fee defines the default exchange trade fee for makers on a spot market" + }, + { + "Parameter": "default_spot_taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_spot_taker_fee_rate defines the default exchange trade fee rate for takers on a new spot market" + }, + { + "Parameter": "default_derivative_maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_derivative_maker_fee defines the default exchange trade fee for makers on a new derivative market" + }, + { + "Parameter": "default_derivative_taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_derivative_taker_fee defines the default exchange trade fee for takers on a new derivative market" + }, + { + "Parameter": "default_initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_initial_margin_ratio defines the default initial margin ratio on a new derivative market" + }, + { + "Parameter": "default_maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_maintenance_margin_ratio defines the default maintenance margin ratio on a new derivative market" + }, + { + "Parameter": "default_funding_interval", + "Type": "int64", + "Description": "default_funding_interval defines the default funding interval on a derivative market" + }, + { + "Parameter": "funding_multiple", + "Type": "int64", + "Description": "funding_multiple defines the timestamp multiple that the funding timestamp should be a multiple of" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the trade fee share percentage that goes to relayers" + }, + { + "Parameter": "default_hourly_funding_rate_cap", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_hourly_funding_rate_cap defines the default maximum absolute value of the hourly funding rate" + }, + { + "Parameter": "default_hourly_interest_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_interest_rate defines the hourly interest rate" + }, + { + "Parameter": "max_derivative_order_side_count", + "Type": "uint32", + "Description": "max_derivative_order_side_count defines the maximum number of derivative active orders a subaccount can have for a given orderbook side" + }, + { + "Parameter": "inj_reward_staked_requirement_threshold", + "Type": "cosmossdk_io_math.Int", + "Description": "inj_reward_staked_requirement_threshold defines the threshold on INJ rewards after which one also needs staked INJ to receive more" + }, + { + "Parameter": "trading_rewards_vesting_duration", + "Type": "int64", + "Description": "the trading_rewards_vesting_duration defines the vesting times for trading rewards" + }, + { + "Parameter": "liquidator_reward_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "liquidator_reward_share_rate defines the ratio of the split of the surplus collateral that goes to the liquidator" + }, + { + "Parameter": "binary_options_market_instant_listing_fee", + "Type": "types.Coin", + "Description": "binary_options_market_instant_listing_fee defines the expedited fee in INJ required to create a derivative market by bypassing governance" + }, + { + "Parameter": "atomic_market_order_access_level", + "Type": "AtomicMarketOrderAccessLevel", + "Description": "atomic_market_order_access_level defines the required access permissions for executing atomic market orders" + }, + { + "Parameter": "spot_atomic_market_order_fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "spot_atomic_market_order_fee_multiplier defines the default multiplier for executing atomic market orders in spot markets" + }, + { + "Parameter": "derivative_atomic_market_order_fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "derivative_atomic_market_order_fee_multiplier defines the default multiplier for executing atomic market orders in derivative markets" + }, + { + "Parameter": "binary_options_atomic_market_order_fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "binary_options_atomic_market_order_fee_multiplier defines the default multiplier for executing atomic market orders in binary markets" + }, + { + "Parameter": "minimal_protocol_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "minimal_protocol_fee_rate defines the minimal protocol fee rate" + }, + { + "Parameter": "is_instant_derivative_market_launch_enabled", + "Type": "bool", + "Description": "is_instant_derivative_market_launch_enabled defines whether instant derivative market launch is enabled" + }, + { + "Parameter": "post_only_mode_height_threshold", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "margin_decrease_price_timestamp_threshold_seconds", + "Type": "int64", + "Description": "Maximum time in seconds since the last mark price update to allow a decrease in margin" + }, + { + "Parameter": "exchange_admins", + "Type": "string array", + "Description": "List of addresses that are allowed to perform exchange admin operations" + }, + { + "Parameter": "inj_auction_max_cap", + "Type": "cosmossdk_io_math.Int", + "Description": "inj_auction_max_cap defines the maximum cap for INJ sent to auction" + }, + { + "Parameter": "fixed_gas_enabled", + "Type": "bool", + "Description": "fixed_gas_enabled indicates if msg server will consume fixed gas amount for certain msg types" + } +] diff --git a/source/json_tables/injective/exchange/PerpetualMarketFunding.json b/source/json_tables/injective/exchange/PerpetualMarketFunding.json new file mode 100644 index 00000000..06a5d50a --- /dev/null +++ b/source/json_tables/injective/exchange/PerpetualMarketFunding.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "cumulative_funding", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "cumulative_funding defines the cumulative funding of a perpetual market." + }, + { + "Parameter": "cumulative_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "cumulative_price defines the cumulative price for the current hour up to the last timestamp (in chain format)" + }, + { + "Parameter": "last_timestamp", + "Type": "int64", + "Description": "the last timestamp in seconds" + } +] diff --git a/source/json_tables/injective/exchange/PerpetualMarketFundingState.json b/source/json_tables/injective/exchange/PerpetualMarketFundingState.json new file mode 100644 index 00000000..f063b60e --- /dev/null +++ b/source/json_tables/injective/exchange/PerpetualMarketFundingState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "funding", + "Type": "PerpetualMarketFunding", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/PerpetualMarketInfo.json b/source/json_tables/injective/exchange/PerpetualMarketInfo.json new file mode 100644 index 00000000..26cd6e6e --- /dev/null +++ b/source/json_tables/injective/exchange/PerpetualMarketInfo.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market ID." + }, + { + "Parameter": "hourly_funding_rate_cap", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_funding_rate_cap defines the maximum absolute value of the hourly funding rate" + }, + { + "Parameter": "hourly_interest_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_interest_rate defines the hourly interest rate" + }, + { + "Parameter": "next_funding_timestamp", + "Type": "int64", + "Description": "next_funding_timestamp defines the next funding timestamp in seconds of a perpetual market" + }, + { + "Parameter": "funding_interval", + "Type": "int64", + "Description": "funding_interval defines the next funding interval in seconds of a perpetual market." + } +] diff --git a/source/json_tables/injective/exchange/PerpetualMarketLaunchProposal.json b/source/json_tables/injective/exchange/PerpetualMarketLaunchProposal.json new file mode 100644 index 00000000..dedaf4ef --- /dev/null +++ b/source/json_tables/injective/exchange/PerpetualMarketLaunchProposal.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative market." + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the base currency" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio for the derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio for the derivative market" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the exchange trade fee for makers for the derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the exchange trade fee for takers for the derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/PerpetualMarketState.json b/source/json_tables/injective/exchange/PerpetualMarketState.json new file mode 100644 index 00000000..4dda8645 --- /dev/null +++ b/source/json_tables/injective/exchange/PerpetualMarketState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_info", + "Type": "PerpetualMarketInfo", + "Description": "" + }, + { + "Parameter": "funding_info", + "Type": "PerpetualMarketFunding", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/PointsMultiplier.json b/source/json_tables/injective/exchange/PointsMultiplier.json new file mode 100644 index 00000000..dc9bfc18 --- /dev/null +++ b/source/json_tables/injective/exchange/PointsMultiplier.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "maker_points_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "taker_points_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/Position.json b/source/json_tables/injective/exchange/Position.json new file mode 100644 index 00000000..356094cc --- /dev/null +++ b/source/json_tables/injective/exchange/Position.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "isLong", + "Type": "bool", + "Description": "True if the position is long. False if the position is short." + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The quantity of the position (in chain format)" + }, + { + "Parameter": "entry_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The entry price of the position (in chain format)" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The margin of the position (in chain format)" + }, + { + "Parameter": "cumulative_funding_entry", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The cumulative funding" + } +] diff --git a/source/json_tables/injective/exchange/PositionDelta.json b/source/json_tables/injective/exchange/PositionDelta.json new file mode 100644 index 00000000..6b03dc30 --- /dev/null +++ b/source/json_tables/injective/exchange/PositionDelta.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "is_long", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "execution_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "execution_margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "execution_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/PriceLevel.json b/source/json_tables/injective/exchange/PriceLevel.json new file mode 100644 index 00000000..801e8051 --- /dev/null +++ b/source/json_tables/injective/exchange/PriceLevel.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity" + } +] diff --git a/source/json_tables/injective/exchange/ProviderOracleParams.json b/source/json_tables/injective/exchange/ProviderOracleParams.json new file mode 100644 index 00000000..bfac78ac --- /dev/null +++ b/source/json_tables/injective/exchange/ProviderOracleParams.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "provider", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + } +] diff --git a/source/json_tables/injective/exchange/QueryAccountAddressDerivativeOrdersRequest.json b/source/json_tables/injective/exchange/QueryAccountAddressDerivativeOrdersRequest.json new file mode 100644 index 00000000..0dee911b --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAccountAddressDerivativeOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address of the trader", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryAccountAddressDerivativeOrdersResponse.json b/source/json_tables/injective/exchange/QueryAccountAddressDerivativeOrdersResponse.json new file mode 100644 index 00000000..ef320bcb --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAccountAddressDerivativeOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedDerivativeLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryAccountAddressSpotOrdersRequest.json b/source/json_tables/injective/exchange/QueryAccountAddressSpotOrdersRequest.json new file mode 100644 index 00000000..0dee911b --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAccountAddressSpotOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address of the trader", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryAccountAddressSpotOrdersResponse.json b/source/json_tables/injective/exchange/QueryAccountAddressSpotOrdersResponse.json new file mode 100644 index 00000000..37b944cd --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAccountAddressSpotOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedSpotLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryActiveStakeGrantRequest.json b/source/json_tables/injective/exchange/QueryActiveStakeGrantRequest.json new file mode 100644 index 00000000..e4d70b5b --- /dev/null +++ b/source/json_tables/injective/exchange/QueryActiveStakeGrantRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "grantee", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryActiveStakeGrantResponse.json b/source/json_tables/injective/exchange/QueryActiveStakeGrantResponse.json new file mode 100644 index 00000000..6e463b5e --- /dev/null +++ b/source/json_tables/injective/exchange/QueryActiveStakeGrantResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "grant", + "Type": "ActiveGrant", + "Description": "" + }, + { + "Parameter": "effective_grant", + "Type": "EffectiveGrant", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryAggregateMarketVolumeRequest.json b/source/json_tables/injective/exchange/QueryAggregateMarketVolumeRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAggregateMarketVolumeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryAggregateMarketVolumeResponse.json b/source/json_tables/injective/exchange/QueryAggregateMarketVolumeResponse.json new file mode 100644 index 00000000..edd45193 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAggregateMarketVolumeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "volume", + "Type": "VolumeRecord", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryAggregateMarketVolumesRequest.json b/source/json_tables/injective/exchange/QueryAggregateMarketVolumesRequest.json new file mode 100644 index 00000000..d27c139f --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAggregateMarketVolumesRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryAggregateMarketVolumesResponse.json b/source/json_tables/injective/exchange/QueryAggregateMarketVolumesResponse.json new file mode 100644 index 00000000..d298b03d --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAggregateMarketVolumesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "volumes", + "Type": "MarketVolume array", + "Description": "the aggregate volumes for the entire market" + } +] diff --git a/source/json_tables/injective/exchange/QueryAggregateVolumeRequest.json b/source/json_tables/injective/exchange/QueryAggregateVolumeRequest.json new file mode 100644 index 00000000..9266a1f4 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAggregateVolumeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "can either be an address or a subaccount", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryAggregateVolumeResponse.json b/source/json_tables/injective/exchange/QueryAggregateVolumeResponse.json new file mode 100644 index 00000000..ae6e7779 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAggregateVolumeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "aggregate_volumes", + "Type": "MarketVolume array", + "Description": "if an address is specified, then the aggregate_volumes will aggregate the volumes across all subaccounts for the address" + } +] diff --git a/source/json_tables/injective/exchange/QueryAggregateVolumesRequest.json b/source/json_tables/injective/exchange/QueryAggregateVolumesRequest.json new file mode 100644 index 00000000..0b35ce27 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAggregateVolumesRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "accounts", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryAggregateVolumesResponse.json b/source/json_tables/injective/exchange/QueryAggregateVolumesResponse.json new file mode 100644 index 00000000..09784e6c --- /dev/null +++ b/source/json_tables/injective/exchange/QueryAggregateVolumesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "aggregate_account_volumes", + "Type": "AggregateAccountVolumeRecord array", + "Description": "the aggregate volume records for the accounts specified" + }, + { + "Parameter": "aggregate_market_volumes", + "Type": "MarketVolume array", + "Description": "the aggregate volumes for the markets specified" + } +] diff --git a/source/json_tables/injective/exchange/QueryBalanceMismatchesRequest.json b/source/json_tables/injective/exchange/QueryBalanceMismatchesRequest.json new file mode 100644 index 00000000..903a2986 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryBalanceMismatchesRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "dust_factor", + "Type": "int64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryBalanceMismatchesResponse.json b/source/json_tables/injective/exchange/QueryBalanceMismatchesResponse.json new file mode 100644 index 00000000..dcf6c578 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryBalanceMismatchesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance_mismatches", + "Type": "BalanceMismatch array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryBalanceWithBalanceHoldsResponse.json b/source/json_tables/injective/exchange/QueryBalanceWithBalanceHoldsResponse.json new file mode 100644 index 00000000..d9a463b7 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryBalanceWithBalanceHoldsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance_with_balance_holds", + "Type": "BalanceWithMarginHold array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryBinaryMarketsRequest.json b/source/json_tables/injective/exchange/QueryBinaryMarketsRequest.json new file mode 100644 index 00000000..cb30b1e5 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryBinaryMarketsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the market, for convenience it is set to string - not enum", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryBinaryMarketsResponse.json b/source/json_tables/injective/exchange/QueryBinaryMarketsResponse.json new file mode 100644 index 00000000..6ca794b0 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryBinaryMarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "BinaryOptionsMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryDenomDecimalRequest.json b/source/json_tables/injective/exchange/QueryDenomDecimalRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDenomDecimalRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryDenomDecimalResponse.json b/source/json_tables/injective/exchange/QueryDenomDecimalResponse.json new file mode 100644 index 00000000..adffa0ac --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDenomDecimalResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "decimal", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryDenomDecimalsRequest.json b/source/json_tables/injective/exchange/QueryDenomDecimalsRequest.json new file mode 100644 index 00000000..691ba356 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDenomDecimalsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denoms", + "Type": "string array", + "Description": "denoms can be empty to query all denom decimals", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryDenomDecimalsResponse.json b/source/json_tables/injective/exchange/QueryDenomDecimalsResponse.json new file mode 100644 index 00000000..9fced98e --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDenomDecimalsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "denom_decimals", + "Type": "DenomDecimals array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryDenomMinNotionalRequest.json b/source/json_tables/injective/exchange/QueryDenomMinNotionalRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDenomMinNotionalRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryDenomMinNotionalResponse.json b/source/json_tables/injective/exchange/QueryDenomMinNotionalResponse.json new file mode 100644 index 00000000..fd9c915c --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDenomMinNotionalResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the minimum notional amount for the denom (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/QueryDenomMinNotionalsResponse.json b/source/json_tables/injective/exchange/QueryDenomMinNotionalsResponse.json new file mode 100644 index 00000000..b56ff46c --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDenomMinNotionalsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "denom_min_notionals", + "Type": "DenomMinNotional array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeMarketAddressRequest.json b/source/json_tables/injective/exchange/QueryDerivativeMarketAddressRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeMarketAddressRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeMarketAddressResponse.json b/source/json_tables/injective/exchange/QueryDerivativeMarketAddressResponse.json new file mode 100644 index 00000000..b3f4b483 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeMarketAddressResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address for the market" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccountID for the market" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeMarketRequest.json b/source/json_tables/injective/exchange/QueryDerivativeMarketRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeMarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeMarketResponse.json b/source/json_tables/injective/exchange/QueryDerivativeMarketResponse.json new file mode 100644 index 00000000..7b265398 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "FullDerivativeMarket", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeMarketsRequest.json b/source/json_tables/injective/exchange/QueryDerivativeMarketsRequest.json new file mode 100644 index 00000000..60afd827 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeMarketsRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the market, for convenience it is set to string - not enum", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "Filter by market IDs", + "Required": "Yes" + }, + { + "Parameter": "with_mid_price_and_tob", + "Type": "bool", + "Description": "Flag to return the markets mid price and top of the book buy and sell orders.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeMarketsResponse.json b/source/json_tables/injective/exchange/QueryDerivativeMarketsResponse.json new file mode 100644 index 00000000..04655922 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeMarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "FullDerivativeMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeMidPriceAndTOBRequest.json b/source/json_tables/injective/exchange/QueryDerivativeMidPriceAndTOBRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeMidPriceAndTOBRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeMidPriceAndTOBResponse.json b/source/json_tables/injective/exchange/QueryDerivativeMidPriceAndTOBResponse.json new file mode 100644 index 00000000..eb70dcc6 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeMidPriceAndTOBResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "mid_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "mid price of the market" + }, + { + "Parameter": "best_buy_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best buy price of the market" + }, + { + "Parameter": "best_sell_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best sell price of the market" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeOrderbookRequest.json b/source/json_tables/injective/exchange/QueryDerivativeOrderbookRequest.json new file mode 100644 index 00000000..8f8d6192 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeOrderbookRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "limit_cumulative_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeOrderbookResponse.json b/source/json_tables/injective/exchange/QueryDerivativeOrderbookResponse.json new file mode 100644 index 00000000..74f73ed8 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeOrderbookResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "buys_price_level", + "Type": "Level array", + "Description": "" + }, + { + "Parameter": "sells_price_level", + "Type": "Level array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeOrdersByHashesRequest.json b/source/json_tables/injective/exchange/QueryDerivativeOrdersByHashesRequest.json new file mode 100644 index 00000000..2c1f7287 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeOrdersByHashesRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + }, + { + "Parameter": "order_hashes", + "Type": "string array", + "Description": "the order hashes", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryDerivativeOrdersByHashesResponse.json b/source/json_tables/injective/exchange/QueryDerivativeOrdersByHashesResponse.json new file mode 100644 index 00000000..ef320bcb --- /dev/null +++ b/source/json_tables/injective/exchange/QueryDerivativeOrdersByHashesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedDerivativeLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryExchangeBalancesResponse.json b/source/json_tables/injective/exchange/QueryExchangeBalancesResponse.json new file mode 100644 index 00000000..e5b39b59 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryExchangeBalancesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balances", + "Type": "Balance array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryExchangeParamsResponse.json b/source/json_tables/injective/exchange/QueryExchangeParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryExchangeParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryExpiryFuturesMarketInfoRequest.json b/source/json_tables/injective/exchange/QueryExpiryFuturesMarketInfoRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryExpiryFuturesMarketInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryExpiryFuturesMarketInfoResponse.json b/source/json_tables/injective/exchange/QueryExpiryFuturesMarketInfoResponse.json new file mode 100644 index 00000000..5ba19021 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryExpiryFuturesMarketInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "info", + "Type": "ExpiryFuturesMarketInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryFeeDiscountAccountInfoRequest.json b/source/json_tables/injective/exchange/QueryFeeDiscountAccountInfoRequest.json new file mode 100644 index 00000000..5cca90ec --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFeeDiscountAccountInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryFeeDiscountAccountInfoResponse.json b/source/json_tables/injective/exchange/QueryFeeDiscountAccountInfoResponse.json new file mode 100644 index 00000000..334c284d --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFeeDiscountAccountInfoResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "tier_level", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "account_info", + "Type": "FeeDiscountTierInfo", + "Description": "" + }, + { + "Parameter": "account_ttl", + "Type": "FeeDiscountTierTTL", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryFeeDiscountScheduleResponse.json b/source/json_tables/injective/exchange/QueryFeeDiscountScheduleResponse.json new file mode 100644 index 00000000..d44af734 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFeeDiscountScheduleResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "fee_discount_schedule", + "Type": "FeeDiscountSchedule", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryFeeDiscountTierStatisticsResponse.json b/source/json_tables/injective/exchange/QueryFeeDiscountTierStatisticsResponse.json new file mode 100644 index 00000000..4265f017 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFeeDiscountTierStatisticsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "statistics", + "Type": "TierStatistic array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryFullDerivativeOrderbookRequest.json b/source/json_tables/injective/exchange/QueryFullDerivativeOrderbookRequest.json new file mode 100644 index 00000000..409e8e83 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFullDerivativeOrderbookRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market id", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryFullDerivativeOrderbookResponse.json b/source/json_tables/injective/exchange/QueryFullDerivativeOrderbookResponse.json new file mode 100644 index 00000000..d658e038 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFullDerivativeOrderbookResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "Bids", + "Type": "TrimmedLimitOrder array", + "Description": "" + }, + { + "Parameter": "Asks", + "Type": "TrimmedLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryFullSpotMarketRequest.json b/source/json_tables/injective/exchange/QueryFullSpotMarketRequest.json new file mode 100644 index 00000000..84d52e70 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFullSpotMarketRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "with_mid_price_and_tob", + "Type": "bool", + "Description": "Flag to return the markets mid price and top of the book buy and sell orders.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryFullSpotMarketResponse.json b/source/json_tables/injective/exchange/QueryFullSpotMarketResponse.json new file mode 100644 index 00000000..1ab90c27 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFullSpotMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "FullSpotMarket", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryFullSpotMarketsRequest.json b/source/json_tables/injective/exchange/QueryFullSpotMarketsRequest.json new file mode 100644 index 00000000..60afd827 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFullSpotMarketsRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the market, for convenience it is set to string - not enum", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "Filter by market IDs", + "Required": "Yes" + }, + { + "Parameter": "with_mid_price_and_tob", + "Type": "bool", + "Description": "Flag to return the markets mid price and top of the book buy and sell orders.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryFullSpotMarketsResponse.json b/source/json_tables/injective/exchange/QueryFullSpotMarketsResponse.json new file mode 100644 index 00000000..5fca8967 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFullSpotMarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "FullSpotMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryFullSpotOrderbookRequest.json b/source/json_tables/injective/exchange/QueryFullSpotOrderbookRequest.json new file mode 100644 index 00000000..409e8e83 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFullSpotOrderbookRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market id", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryFullSpotOrderbookResponse.json b/source/json_tables/injective/exchange/QueryFullSpotOrderbookResponse.json new file mode 100644 index 00000000..d658e038 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryFullSpotOrderbookResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "Bids", + "Type": "TrimmedLimitOrder array", + "Description": "" + }, + { + "Parameter": "Asks", + "Type": "TrimmedLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryGrantAuthorizationRequest.json b/source/json_tables/injective/exchange/QueryGrantAuthorizationRequest.json new file mode 100644 index 00000000..f788df59 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryGrantAuthorizationRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "grantee", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryGrantAuthorizationResponse.json b/source/json_tables/injective/exchange/QueryGrantAuthorizationResponse.json new file mode 100644 index 00000000..78431df1 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryGrantAuthorizationResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryGrantAuthorizationsRequest.json b/source/json_tables/injective/exchange/QueryGrantAuthorizationsRequest.json new file mode 100644 index 00000000..452375a3 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryGrantAuthorizationsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryGrantAuthorizationsResponse.json b/source/json_tables/injective/exchange/QueryGrantAuthorizationsResponse.json new file mode 100644 index 00000000..2141ecb4 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryGrantAuthorizationsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "total_grant_amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "grants", + "Type": "GrantAuthorization array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryHistoricalTradeRecordsRequest.json b/source/json_tables/injective/exchange/QueryHistoricalTradeRecordsRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryHistoricalTradeRecordsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryHistoricalTradeRecordsResponse.json b/source/json_tables/injective/exchange/QueryHistoricalTradeRecordsResponse.json new file mode 100644 index 00000000..626aec96 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryHistoricalTradeRecordsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "trade_records", + "Type": "TradeRecords array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryIsOptedOutOfRewardsRequest.json b/source/json_tables/injective/exchange/QueryIsOptedOutOfRewardsRequest.json new file mode 100644 index 00000000..5cca90ec --- /dev/null +++ b/source/json_tables/injective/exchange/QueryIsOptedOutOfRewardsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryIsOptedOutOfRewardsResponse.json b/source/json_tables/injective/exchange/QueryIsOptedOutOfRewardsResponse.json new file mode 100644 index 00000000..19377f9f --- /dev/null +++ b/source/json_tables/injective/exchange/QueryIsOptedOutOfRewardsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "is_opted_out", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketAtomicExecutionFeeMultiplierRequest.json b/source/json_tables/injective/exchange/QueryMarketAtomicExecutionFeeMultiplierRequest.json new file mode 100644 index 00000000..d2312f4a --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketAtomicExecutionFeeMultiplierRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketAtomicExecutionFeeMultiplierResponse.json b/source/json_tables/injective/exchange/QueryMarketAtomicExecutionFeeMultiplierResponse.json new file mode 100644 index 00000000..bcf8ade7 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketAtomicExecutionFeeMultiplierResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketBalanceRequest.json b/source/json_tables/injective/exchange/QueryMarketBalanceRequest.json new file mode 100644 index 00000000..409e8e83 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketBalanceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market id", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketBalanceResponse.json b/source/json_tables/injective/exchange/QueryMarketBalanceResponse.json new file mode 100644 index 00000000..d341d232 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketBalanceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance", + "Type": "MarketBalance", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketBalancesResponse.json b/source/json_tables/injective/exchange/QueryMarketBalancesResponse.json new file mode 100644 index 00000000..fac43ddf --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketBalancesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balances", + "Type": "MarketBalance array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketIDFromVaultRequest.json b/source/json_tables/injective/exchange/QueryMarketIDFromVaultRequest.json new file mode 100644 index 00000000..77e78b52 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketIDFromVaultRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "vault_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketIDFromVaultResponse.json b/source/json_tables/injective/exchange/QueryMarketIDFromVaultResponse.json new file mode 100644 index 00000000..383d1f91 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketIDFromVaultResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketVolatilityRequest.json b/source/json_tables/injective/exchange/QueryMarketVolatilityRequest.json new file mode 100644 index 00000000..1ff1c79b --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketVolatilityRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "trade_history_options", + "Type": "TradeHistoryOptions", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/QueryMarketVolatilityResponse.json b/source/json_tables/injective/exchange/QueryMarketVolatilityResponse.json new file mode 100644 index 00000000..cb9911e7 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryMarketVolatilityResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "volatility", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "history_metadata", + "Type": "types.MetadataStatistics", + "Description": "" + }, + { + "Parameter": "raw_history", + "Type": "TradeRecord array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryModuleStateResponse.json b/source/json_tables/injective/exchange/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryOptedOutOfRewardsAccountsResponse.json b/source/json_tables/injective/exchange/QueryOptedOutOfRewardsAccountsResponse.json new file mode 100644 index 00000000..f2a19fc9 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryOptedOutOfRewardsAccountsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "accounts", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryPerpetualMarketFundingRequest.json b/source/json_tables/injective/exchange/QueryPerpetualMarketFundingRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryPerpetualMarketFundingRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryPerpetualMarketFundingResponse.json b/source/json_tables/injective/exchange/QueryPerpetualMarketFundingResponse.json new file mode 100644 index 00000000..ed808a6e --- /dev/null +++ b/source/json_tables/injective/exchange/QueryPerpetualMarketFundingResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "PerpetualMarketFunding", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryPerpetualMarketInfoRequest.json b/source/json_tables/injective/exchange/QueryPerpetualMarketInfoRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryPerpetualMarketInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryPerpetualMarketInfoResponse.json b/source/json_tables/injective/exchange/QueryPerpetualMarketInfoResponse.json new file mode 100644 index 00000000..f1abec61 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryPerpetualMarketInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "info", + "Type": "PerpetualMarketInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryPositionsResponse.json b/source/json_tables/injective/exchange/QueryPositionsResponse.json new file mode 100644 index 00000000..85b2ef42 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryPositionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "DerivativePosition array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotMarketRequest.json b/source/json_tables/injective/exchange/QuerySpotMarketRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotMarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotMarketResponse.json b/source/json_tables/injective/exchange/QuerySpotMarketResponse.json new file mode 100644 index 00000000..b5c7e2a4 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "SpotMarket", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotMarketsRequest.json b/source/json_tables/injective/exchange/QuerySpotMarketsRequest.json new file mode 100644 index 00000000..5108e2ae --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotMarketsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the market, for convenience it is set to string - not enum", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "Filter by market IDs", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotMarketsResponse.json b/source/json_tables/injective/exchange/QuerySpotMarketsResponse.json new file mode 100644 index 00000000..ddfbdb21 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotMarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "SpotMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotMidPriceAndTOBRequest.json b/source/json_tables/injective/exchange/QuerySpotMidPriceAndTOBRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotMidPriceAndTOBRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotMidPriceAndTOBResponse.json b/source/json_tables/injective/exchange/QuerySpotMidPriceAndTOBResponse.json new file mode 100644 index 00000000..4b9b723d --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotMidPriceAndTOBResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "mid_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "mid price of the market (in chain format)" + }, + { + "Parameter": "best_buy_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best buy price of the market (in chain format)" + }, + { + "Parameter": "best_sell_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best sell price of the market (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotOrderbookRequest.json b/source/json_tables/injective/exchange/QuerySpotOrderbookRequest.json new file mode 100644 index 00000000..be3c6db2 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotOrderbookRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "uint64", + "Description": "the maximum number of orderbook entries to return per side (optional)", + "Required": "No" + }, + { + "Parameter": "order_side", + "Type": "OrderSide", + "Description": "the order side to return the orderbook entries for (optional)", + "Required": "No" + }, + { + "Parameter": "limit_cumulative_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "limits the number of entries to return per side based on the cumulative notional (in chain format)", + "Required": "No" + }, + { + "Parameter": "limit_cumulative_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "limits the number of entries to return per side based on the cumulative quantity (in chain format)", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotOrderbookResponse.json b/source/json_tables/injective/exchange/QuerySpotOrderbookResponse.json new file mode 100644 index 00000000..74f73ed8 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotOrderbookResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "buys_price_level", + "Type": "Level array", + "Description": "" + }, + { + "Parameter": "sells_price_level", + "Type": "Level array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotOrdersByHashesRequest.json b/source/json_tables/injective/exchange/QuerySpotOrdersByHashesRequest.json new file mode 100644 index 00000000..2c1f7287 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotOrdersByHashesRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + }, + { + "Parameter": "order_hashes", + "Type": "string array", + "Description": "the order hashes", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySpotOrdersByHashesResponse.json b/source/json_tables/injective/exchange/QuerySpotOrdersByHashesResponse.json new file mode 100644 index 00000000..37b944cd --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySpotOrdersByHashesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedSpotLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountDepositRequest.json b/source/json_tables/injective/exchange/QuerySubaccountDepositRequest.json new file mode 100644 index 00000000..ce66b581 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountDepositRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the balance", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountDepositResponse.json b/source/json_tables/injective/exchange/QuerySubaccountDepositResponse.json new file mode 100644 index 00000000..0cc1c269 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountDepositResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "deposits", + "Type": "Deposit", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountDepositsRequest.json b/source/json_tables/injective/exchange/QuerySubaccountDepositsRequest.json new file mode 100644 index 00000000..100ea5dc --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountDepositsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "subaccount", + "Type": "Subaccount", + "Description": "subaccount details", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountDepositsResponse.json b/source/json_tables/injective/exchange/QuerySubaccountDepositsResponse.json new file mode 100644 index 00000000..96bc2e6c --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountDepositsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "deposits", + "Type": "map[string]Deposit", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountEffectivePositionInMarketRequest.json b/source/json_tables/injective/exchange/QuerySubaccountEffectivePositionInMarketRequest.json new file mode 100644 index 00000000..6968bc24 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountEffectivePositionInMarketRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountEffectivePositionInMarketResponse.json b/source/json_tables/injective/exchange/QuerySubaccountEffectivePositionInMarketResponse.json new file mode 100644 index 00000000..1efde0db --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountEffectivePositionInMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "EffectivePosition", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountOrderMetadataRequest.json b/source/json_tables/injective/exchange/QuerySubaccountOrderMetadataRequest.json new file mode 100644 index 00000000..d26bb9a4 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountOrderMetadataRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountOrderMetadataResponse.json b/source/json_tables/injective/exchange/QuerySubaccountOrderMetadataResponse.json new file mode 100644 index 00000000..037b2dd4 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountOrderMetadataResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "metadata", + "Type": "SubaccountOrderbookMetadataWithMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountOrdersRequest.json b/source/json_tables/injective/exchange/QuerySubaccountOrdersRequest.json new file mode 100644 index 00000000..6968bc24 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountOrdersResponse.json b/source/json_tables/injective/exchange/QuerySubaccountOrdersResponse.json new file mode 100644 index 00000000..0c8eed53 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountOrdersResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "buy_orders", + "Type": "SubaccountOrderData array", + "Description": "" + }, + { + "Parameter": "sell_orders", + "Type": "SubaccountOrderData array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountPositionInMarketRequest.json b/source/json_tables/injective/exchange/QuerySubaccountPositionInMarketRequest.json new file mode 100644 index 00000000..6968bc24 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountPositionInMarketRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountPositionInMarketResponse.json b/source/json_tables/injective/exchange/QuerySubaccountPositionInMarketResponse.json new file mode 100644 index 00000000..093e6566 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountPositionInMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "Position", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountPositionsRequest.json b/source/json_tables/injective/exchange/QuerySubaccountPositionsRequest.json new file mode 100644 index 00000000..d26bb9a4 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountPositionsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountPositionsResponse.json b/source/json_tables/injective/exchange/QuerySubaccountPositionsResponse.json new file mode 100644 index 00000000..85b2ef42 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountPositionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "DerivativePosition array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountTradeNonceRequest.json b/source/json_tables/injective/exchange/QuerySubaccountTradeNonceRequest.json new file mode 100644 index 00000000..d26bb9a4 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountTradeNonceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QuerySubaccountTradeNonceResponse.json b/source/json_tables/injective/exchange/QuerySubaccountTradeNonceResponse.json new file mode 100644 index 00000000..a85c3523 --- /dev/null +++ b/source/json_tables/injective/exchange/QuerySubaccountTradeNonceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "nonce", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryTradeRewardCampaignResponse.json b/source/json_tables/injective/exchange/QueryTradeRewardCampaignResponse.json new file mode 100644 index 00000000..9d2051cb --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTradeRewardCampaignResponse.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "trading_reward_campaign_info", + "Type": "TradingRewardCampaignInfo", + "Description": "" + }, + { + "Parameter": "trading_reward_pool_campaign_schedule", + "Type": "CampaignRewardPool array", + "Description": "" + }, + { + "Parameter": "total_trade_reward_points", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "pending_trading_reward_pool_campaign_schedule", + "Type": "CampaignRewardPool array", + "Description": "" + }, + { + "Parameter": "pending_total_trade_reward_points", + "Type": "cosmossdk_io_math.LegacyDec array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryTradeRewardPointsRequest.json b/source/json_tables/injective/exchange/QueryTradeRewardPointsRequest.json new file mode 100644 index 00000000..3616b9ca --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTradeRewardPointsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "accounts", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "pending_pool_timestamp", + "Type": "int64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryTradeRewardPointsResponse.json b/source/json_tables/injective/exchange/QueryTradeRewardPointsResponse.json new file mode 100644 index 00000000..f2929226 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTradeRewardPointsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "account_trade_reward_points", + "Type": "cosmossdk_io_math.LegacyDec array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryTraderDerivativeConditionalOrdersRequest.json b/source/json_tables/injective/exchange/QueryTraderDerivativeConditionalOrdersRequest.json new file mode 100644 index 00000000..6968bc24 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTraderDerivativeConditionalOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryTraderDerivativeConditionalOrdersResponse.json b/source/json_tables/injective/exchange/QueryTraderDerivativeConditionalOrdersResponse.json new file mode 100644 index 00000000..8c9253b6 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTraderDerivativeConditionalOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedDerivativeConditionalOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersRequest.json b/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersRequest.json new file mode 100644 index 00000000..2dba47a4 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersResponse.json b/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersResponse.json new file mode 100644 index 00000000..ef320bcb --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedDerivativeLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersToCancelUpToAmountRequest.json b/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersToCancelUpToAmountRequest.json new file mode 100644 index 00000000..e95679b3 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTraderDerivativeOrdersToCancelUpToAmountRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + }, + { + "Parameter": "quote_amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quote amount to cancel (free up)", + "Required": "Yes" + }, + { + "Parameter": "strategy", + "Type": "CancellationStrategy", + "Description": "The cancellation strategy", + "Required": "Yes" + }, + { + "Parameter": "reference_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The reference price for the cancellation strategy, e.g. mid price or mark price", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/QueryTraderSpotOrdersRequest.json b/source/json_tables/injective/exchange/QueryTraderSpotOrdersRequest.json new file mode 100644 index 00000000..2dba47a4 --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTraderSpotOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/QueryTraderSpotOrdersResponse.json b/source/json_tables/injective/exchange/QueryTraderSpotOrdersResponse.json new file mode 100644 index 00000000..37b944cd --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTraderSpotOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedSpotLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/QueryTraderSpotOrdersToCancelUpToAmountRequest.json b/source/json_tables/injective/exchange/QueryTraderSpotOrdersToCancelUpToAmountRequest.json new file mode 100644 index 00000000..889acbba --- /dev/null +++ b/source/json_tables/injective/exchange/QueryTraderSpotOrdersToCancelUpToAmountRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + }, + { + "Parameter": "base_amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the base amount to cancel (free up)", + "Required": "Yes" + }, + { + "Parameter": "quote_amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quote amount to cancel (free up)", + "Required": "Yes" + }, + { + "Parameter": "strategy", + "Type": "CancellationStrategy", + "Description": "The cancellation strategy", + "Required": "Yes" + }, + { + "Parameter": "reference_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The reference price for the cancellation strategy, e.g. mid price or mark price", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/RewardPointUpdate.json b/source/json_tables/injective/exchange/RewardPointUpdate.json new file mode 100644 index 00000000..767289e4 --- /dev/null +++ b/source/json_tables/injective/exchange/RewardPointUpdate.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "new_points", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "new_points overwrites the current trading reward points for the account" + } +] diff --git a/source/json_tables/injective/exchange/SpotLimitOrder.json b/source/json_tables/injective/exchange/SpotLimitOrder.json new file mode 100644 index 00000000..651150b6 --- /dev/null +++ b/source/json_tables/injective/exchange/SpotLimitOrder.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "fillable", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/SpotMarket.json b/source/json_tables/injective/exchange/SpotMarket.json new file mode 100644 index 00000000..9195300c --- /dev/null +++ b/source/json_tables/injective/exchange/SpotMarket.json @@ -0,0 +1,77 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote asset." + }, + { + "Parameter": "base_denom", + "Type": "string", + "Description": "Coin denom used for the base asset" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Coin used for the quote asset" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the fee percentage makers pay when trading" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the fee percentage takers pay when trading" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the percentage of the transaction fee shared with the relayer in a derivative market" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Unique market ID." + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "Status of the market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price required for orders in the market (in chain format)" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market (in chain format)" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market (in chain format)" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "current market admin" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "level of admin permissions" + }, + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "base token decimals" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + } +] diff --git a/source/json_tables/injective/exchange/SpotMarketLaunchProposal.json b/source/json_tables/injective/exchange/SpotMarketLaunchProposal.json new file mode 100644 index 00000000..bd898d1c --- /dev/null +++ b/source/json_tables/injective/exchange/SpotMarketLaunchProposal.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the spot market." + }, + { + "Parameter": "base_denom", + "Type": "string", + "Description": "type of coin to use as the base currency" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the quote currency" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the fee percentage makers pay when trading" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the fee percentage takers pay when trading" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + }, + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "base token decimals" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + } +] diff --git a/source/json_tables/injective/exchange/SpotMarketOrder.json b/source/json_tables/injective/exchange/SpotMarketOrder.json new file mode 100644 index 00000000..81f1b726 --- /dev/null +++ b/source/json_tables/injective/exchange/SpotMarketOrder.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "balance_hold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + } +] diff --git a/source/json_tables/injective/exchange/SpotMarketOrderResults.json b/source/json_tables/injective/exchange/SpotMarketOrderResults.json new file mode 100644 index 00000000..808ec5f9 --- /dev/null +++ b/source/json_tables/injective/exchange/SpotMarketOrderResults.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/SpotMarketParamUpdateProposal.json b/source/json_tables/injective/exchange/SpotMarketParamUpdateProposal.json new file mode 100644 index 00000000..df7d58b3 --- /dev/null +++ b/source/json_tables/injective/exchange/SpotMarketParamUpdateProposal.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the trade fee rate for makers on the spot market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the trade fee rate for takers on the spot market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the relayer fee share rate for the spot market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + }, + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "base token decimals" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + } +] diff --git a/source/json_tables/injective/exchange/SpotOrder.json b/source/json_tables/injective/exchange/SpotOrder.json new file mode 100644 index 00000000..94d7fbe7 --- /dev/null +++ b/source/json_tables/injective/exchange/SpotOrder.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market_id represents the unique ID of the market" + }, + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + } +] diff --git a/source/json_tables/injective/exchange/SpotOrderBook.json b/source/json_tables/injective/exchange/SpotOrderBook.json new file mode 100644 index 00000000..e7ca0e24 --- /dev/null +++ b/source/json_tables/injective/exchange/SpotOrderBook.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "isBuySide", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "orders", + "Type": "SpotLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/Subaccount.json b/source/json_tables/injective/exchange/Subaccount.json new file mode 100644 index 00000000..17d109d5 --- /dev/null +++ b/source/json_tables/injective/exchange/Subaccount.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "trader", + "Type": "string", + "Description": "" + }, + { + "Parameter": "subaccount_nonce", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountDeposit.json b/source/json_tables/injective/exchange/SubaccountDeposit.json new file mode 100644 index 00000000..215e6ed7 --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountDeposit.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "deposit", + "Type": "Deposit", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountIDs.json b/source/json_tables/injective/exchange/SubaccountIDs.json new file mode 100644 index 00000000..2ea77c4c --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountIDs.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "][byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountNonce.json b/source/json_tables/injective/exchange/SubaccountNonce.json new file mode 100644 index 00000000..87760269 --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountNonce.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "subaccount_trade_nonce", + "Type": "SubaccountTradeNonce", + "Description": "the subaccount trade nonce" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountOrder.json b/source/json_tables/injective/exchange/SubaccountOrder.json new file mode 100644 index 00000000..3fa82f50 --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountOrder.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable" + }, + { + "Parameter": "isReduceOnly", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountOrderData.json b/source/json_tables/injective/exchange/SubaccountOrderData.json new file mode 100644 index 00000000..1bb15474 --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountOrderData.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "order", + "Type": "SubaccountOrder", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountOrderbookMetadata.json b/source/json_tables/injective/exchange/SubaccountOrderbookMetadata.json new file mode 100644 index 00000000..c1d620d5 --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountOrderbookMetadata.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "vanilla_limit_order_count", + "Type": "uint32", + "Description": "The number of vanilla limit orders" + }, + { + "Parameter": "reduce_only_limit_order_count", + "Type": "uint32", + "Description": "The number of reduce-only limit orders" + }, + { + "Parameter": "aggregate_reduce_only_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The aggregate quantity of the subaccount's reduce-only limit orders (in chain format)" + }, + { + "Parameter": "aggregate_vanilla_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The aggregate quantity of the subaccount's vanilla limit orders (in chain format)" + }, + { + "Parameter": "vanilla_conditional_order_count", + "Type": "uint32", + "Description": "The number of vanilla conditional orders" + }, + { + "Parameter": "reduce_only_conditional_order_count", + "Type": "uint32", + "Description": "The number of reduce-only conditional orders" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountOrderbookMetadataWithMarket.json b/source/json_tables/injective/exchange/SubaccountOrderbookMetadataWithMarket.json new file mode 100644 index 00000000..408996c3 --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountOrderbookMetadataWithMarket.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "metadata", + "Type": "SubaccountOrderbookMetadata", + "Description": "the subaccount orderbook metadata" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "true if the order is for buy orders" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountPosition.json b/source/json_tables/injective/exchange/SubaccountPosition.json new file mode 100644 index 00000000..853919be --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountPosition.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "position", + "Type": "Position", + "Description": "" + }, + { + "Parameter": "subaccount_id", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/SubaccountTradeNonce.json b/source/json_tables/injective/exchange/SubaccountTradeNonce.json new file mode 100644 index 00000000..a85c3523 --- /dev/null +++ b/source/json_tables/injective/exchange/SubaccountTradeNonce.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "nonce", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TierStatistic.json b/source/json_tables/injective/exchange/TierStatistic.json new file mode 100644 index 00000000..edbae06e --- /dev/null +++ b/source/json_tables/injective/exchange/TierStatistic.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "tier", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "count", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TradeHistoryOptions.json b/source/json_tables/injective/exchange/TradeHistoryOptions.json new file mode 100644 index 00000000..1754f37c --- /dev/null +++ b/source/json_tables/injective/exchange/TradeHistoryOptions.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "trade_grouping_sec", + "Type": "uint64", + "Description": "TradeGroupingSec of 0 means use the chain's default grouping" + }, + { + "Parameter": "max_age", + "Type": "uint64", + "Description": "MaxAge restricts the trade records oldest age in seconds from the current block time to consider. A value of 0 means use all the records present on the chain." + }, + { + "Parameter": "include_raw_history", + "Type": "bool", + "Description": "If IncludeRawHistory is true, the raw underlying data used for the computation is included in the response" + }, + { + "Parameter": "include_metadata", + "Type": "bool", + "Description": "If IncludeMetadata is true, metadata on the computation is included in the response" + } +] diff --git a/source/json_tables/injective/exchange/TradeLog.json b/source/json_tables/injective/exchange/TradeLog.json new file mode 100644 index 00000000..7934a8b5 --- /dev/null +++ b/source/json_tables/injective/exchange/TradeLog.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "subaccount_id", + "Type": "byte array", + "Description": "bytes32 subaccount ID that executed the trade" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "fee_recipient_address", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TradeRecord.json b/source/json_tables/injective/exchange/TradeRecord.json new file mode 100644 index 00000000..b60c84af --- /dev/null +++ b/source/json_tables/injective/exchange/TradeRecord.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "the timestamp of the trade" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the price of the trade (in chain format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the trade (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/TradeRecords.json b/source/json_tables/injective/exchange/TradeRecords.json new file mode 100644 index 00000000..43ca6ad6 --- /dev/null +++ b/source/json_tables/injective/exchange/TradeRecords.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "latest_trade_records", + "Type": "TradeRecord array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TradingRewardCampaignAccountPendingPoints.json b/source/json_tables/injective/exchange/TradingRewardCampaignAccountPendingPoints.json new file mode 100644 index 00000000..b642d4d2 --- /dev/null +++ b/source/json_tables/injective/exchange/TradingRewardCampaignAccountPendingPoints.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "reward_pool_start_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "account_points", + "Type": "TradingRewardCampaignAccountPoints array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TradingRewardCampaignAccountPoints.json b/source/json_tables/injective/exchange/TradingRewardCampaignAccountPoints.json new file mode 100644 index 00000000..e7a576ce --- /dev/null +++ b/source/json_tables/injective/exchange/TradingRewardCampaignAccountPoints.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "points", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TradingRewardCampaignBoostInfo.json b/source/json_tables/injective/exchange/TradingRewardCampaignBoostInfo.json new file mode 100644 index 00000000..7acee4e0 --- /dev/null +++ b/source/json_tables/injective/exchange/TradingRewardCampaignBoostInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "boosted_spot_market_ids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "spot_market_multipliers", + "Type": "PointsMultiplier array", + "Description": "" + }, + { + "Parameter": "boosted_derivative_market_ids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "derivative_market_multipliers", + "Type": "PointsMultiplier array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TradingRewardCampaignInfo.json b/source/json_tables/injective/exchange/TradingRewardCampaignInfo.json new file mode 100644 index 00000000..063e672c --- /dev/null +++ b/source/json_tables/injective/exchange/TradingRewardCampaignInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "campaign_duration_seconds", + "Type": "int64", + "Description": "number of seconds of the duration of each campaign" + }, + { + "Parameter": "quote_denoms", + "Type": "string array", + "Description": "the trading fee quote denoms which will be counted for the rewards" + }, + { + "Parameter": "trading_reward_boost_info", + "Type": "TradingRewardCampaignBoostInfo", + "Description": "the optional boost info for markets" + }, + { + "Parameter": "disqualified_market_ids", + "Type": "string array", + "Description": "the marketIDs which are disqualified from being rewarded" + } +] diff --git a/source/json_tables/injective/exchange/TradingRewardCampaignLaunchProposal.json b/source/json_tables/injective/exchange/TradingRewardCampaignLaunchProposal.json new file mode 100644 index 00000000..9fecd84b --- /dev/null +++ b/source/json_tables/injective/exchange/TradingRewardCampaignLaunchProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "campaign_info", + "Type": "TradingRewardCampaignInfo", + "Description": "" + }, + { + "Parameter": "campaign_reward_pools", + "Type": "CampaignRewardPool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TradingRewardCampaignUpdateProposal.json b/source/json_tables/injective/exchange/TradingRewardCampaignUpdateProposal.json new file mode 100644 index 00000000..42e4d622 --- /dev/null +++ b/source/json_tables/injective/exchange/TradingRewardCampaignUpdateProposal.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "campaign_info", + "Type": "TradingRewardCampaignInfo", + "Description": "" + }, + { + "Parameter": "campaign_reward_pools_additions", + "Type": "CampaignRewardPool array", + "Description": "" + }, + { + "Parameter": "campaign_reward_pools_updates", + "Type": "CampaignRewardPool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TradingRewardPendingPointsUpdateProposal.json b/source/json_tables/injective/exchange/TradingRewardPendingPointsUpdateProposal.json new file mode 100644 index 00000000..cb05897a --- /dev/null +++ b/source/json_tables/injective/exchange/TradingRewardPendingPointsUpdateProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "pending_pool_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "reward_point_updates", + "Type": "RewardPointUpdate array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/TrimmedDerivativeConditionalOrder.json b/source/json_tables/injective/exchange/TrimmedDerivativeConditionalOrder.json new file mode 100644 index 00000000..cd16fc3e --- /dev/null +++ b/source/json_tables/injective/exchange/TrimmedDerivativeConditionalOrder.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order (in chain format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order (in chain format)" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin of the order (in chain format)" + }, + { + "Parameter": "triggerPrice", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price to trigger the order (in chain format)" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "true if the order is a buy" + }, + { + "Parameter": "isLimit", + "Type": "bool", + "Description": "true if the order is a limit order" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client ID" + } +] diff --git a/source/json_tables/injective/exchange/TrimmedDerivativeLimitOrder.json b/source/json_tables/injective/exchange/TrimmedDerivativeLimitOrder.json new file mode 100644 index 00000000..ca4045f8 --- /dev/null +++ b/source/json_tables/injective/exchange/TrimmedDerivativeLimitOrder.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order (in chain format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order (in chain format)" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin of the order (in chain format)" + }, + { + "Parameter": "fillable", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable (in chain format)" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "true if the order is a buy" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash (optional)" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional)" + } +] diff --git a/source/json_tables/injective/exchange/TrimmedLimitOrder.json b/source/json_tables/injective/exchange/TrimmedLimitOrder.json new file mode 100644 index 00000000..85396799 --- /dev/null +++ b/source/json_tables/injective/exchange/TrimmedLimitOrder.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the price of the order (in chain format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the order (in chain format)" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + } +] diff --git a/source/json_tables/injective/exchange/TrimmedSpotLimitOrder.json b/source/json_tables/injective/exchange/TrimmedSpotLimitOrder.json new file mode 100644 index 00000000..17af4aba --- /dev/null +++ b/source/json_tables/injective/exchange/TrimmedSpotLimitOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order (in chain format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order (in chain format)" + }, + { + "Parameter": "fillable", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable (in chain format)" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "true if the order is a buy" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash (optional)" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional)" + } +] diff --git a/source/json_tables/injective/exchange/UpdateDenomDecimalsProposal.json b/source/json_tables/injective/exchange/UpdateDenomDecimalsProposal.json new file mode 100644 index 00000000..44c2203f --- /dev/null +++ b/source/json_tables/injective/exchange/UpdateDenomDecimalsProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "denom_decimals", + "Type": "DenomDecimals array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/VolumeRecord.json b/source/json_tables/injective/exchange/VolumeRecord.json new file mode 100644 index 00000000..c10e981c --- /dev/null +++ b/source/json_tables/injective/exchange/VolumeRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "maker_volume", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "taker_volume", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v1beta1/AtomicMarketOrderAccessLevel.json b/source/json_tables/injective/exchange/v1beta1/AtomicMarketOrderAccessLevel.json new file mode 100644 index 00000000..11d56718 --- /dev/null +++ b/source/json_tables/injective/exchange/v1beta1/AtomicMarketOrderAccessLevel.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "Nobody" + }, + { + "Code": "1", + "Name": "BeginBlockerSmartContractsOnly" + }, + { + "Code": "2", + "Name": "SmartContractsOnly" + }, + { + "Code": "3", + "Name": "Everyone" + } +] diff --git a/source/json_tables/injective/exchange/v1beta1/CancellationStrategy.json b/source/json_tables/injective/exchange/v1beta1/CancellationStrategy.json new file mode 100644 index 00000000..afc4191e --- /dev/null +++ b/source/json_tables/injective/exchange/v1beta1/CancellationStrategy.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "UnspecifiedOrder" + }, + { + "Code": "1", + "Name": "FromWorstToBest" + }, + { + "Code": "2", + "Name": "FromBestToWorst" + } +] diff --git a/source/json_tables/injective/exchange/v1beta1/ExchangeType.json b/source/json_tables/injective/exchange/v1beta1/ExchangeType.json new file mode 100644 index 00000000..fb478d6d --- /dev/null +++ b/source/json_tables/injective/exchange/v1beta1/ExchangeType.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "EXCHANGE_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "SPOT" + }, + { + "Code": "2", + "Name": "DERIVATIVES" + } +] diff --git a/source/json_tables/injective/exchange/v1beta1/ExecutionType.json b/source/json_tables/injective/exchange/v1beta1/ExecutionType.json new file mode 100644 index 00000000..59644573 --- /dev/null +++ b/source/json_tables/injective/exchange/v1beta1/ExecutionType.json @@ -0,0 +1,30 @@ +[ + { + "Code": "0", + "Name": "UnspecifiedExecutionType" + }, + { + "Code": "1", + "Name": "Market" + }, + { + "Code": "2", + "Name": "LimitFill" + }, + { + "Code": "3", + "Name": "LimitMatchRestingOrder" + }, + { + "Code": "4", + "Name": "LimitMatchNewOrder" + }, + { + "Code": "5", + "Name": "MarketLiquidation" + }, + { + "Code": "6", + "Name": "ExpiryMarketSettlement" + } +] diff --git a/source/json_tables/injective/exchange/v1beta1/MarketStatus.json b/source/json_tables/injective/exchange/v1beta1/MarketStatus.json new file mode 100644 index 00000000..2cf70b03 --- /dev/null +++ b/source/json_tables/injective/exchange/v1beta1/MarketStatus.json @@ -0,0 +1,22 @@ +[ + { + "Code": "0", + "Name": "Unspecified" + }, + { + "Code": "1", + "Name": "Active" + }, + { + "Code": "2", + "Name": "Paused" + }, + { + "Code": "3", + "Name": "Demolished" + }, + { + "Code": "4", + "Name": "Expired" + } +] diff --git a/source/json_tables/injective/exchange/v1beta1/OrderMask.json b/source/json_tables/injective/exchange/v1beta1/OrderMask.json new file mode 100644 index 00000000..cb8b26d1 --- /dev/null +++ b/source/json_tables/injective/exchange/v1beta1/OrderMask.json @@ -0,0 +1,34 @@ +[ + { + "Code": "0", + "Name": "UNUSED" + }, + { + "Code": "1", + "Name": "ANY" + }, + { + "Code": "2", + "Name": "REGULAR" + }, + { + "Code": "4", + "Name": "CONDITIONAL" + }, + { + "Code": "8", + "Name": "DIRECTION_BUY_OR_HIGHER" + }, + { + "Code": "16", + "Name": "DIRECTION_SELL_OR_LOWER" + }, + { + "Code": "32", + "Name": "TYPE_MARKET" + }, + { + "Code": "64", + "Name": "TYPE_LIMIT" + } +] diff --git a/source/json_tables/injective/exchange/v1beta1/OrderSide.json b/source/json_tables/injective/exchange/v1beta1/OrderSide.json new file mode 100644 index 00000000..3ea817f7 --- /dev/null +++ b/source/json_tables/injective/exchange/v1beta1/OrderSide.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "Side_Unspecified" + }, + { + "Code": "1", + "Name": "Buy" + }, + { + "Code": "2", + "Name": "Sell" + } +] diff --git a/source/json_tables/injective/exchange/v1beta1/OrderType.json b/source/json_tables/injective/exchange/v1beta1/OrderType.json new file mode 100644 index 00000000..d381637c --- /dev/null +++ b/source/json_tables/injective/exchange/v1beta1/OrderType.json @@ -0,0 +1,46 @@ +[ + { + "Code": "0", + "Name": "UNSPECIFIED" + }, + { + "Code": "1", + "Name": "BUY" + }, + { + "Code": "2", + "Name": "SELL" + }, + { + "Code": "3", + "Name": "STOP_BUY" + }, + { + "Code": "4", + "Name": "STOP_SELL" + }, + { + "Code": "5", + "Name": "TAKE_BUY" + }, + { + "Code": "6", + "Name": "TAKE_SELL" + }, + { + "Code": "7", + "Name": "BUY_PO" + }, + { + "Code": "8", + "Name": "SELL_PO" + }, + { + "Code": "9", + "Name": "BUY_ATOMIC" + }, + { + "Code": "10", + "Name": "SELL_ATOMIC" + } +] diff --git a/source/json_tables/injective/exchange/v2/AccountRewards.json b/source/json_tables/injective/exchange/v2/AccountRewards.json new file mode 100644 index 00000000..76655ba0 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/AccountRewards.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/AccountVolume.json b/source/json_tables/injective/exchange/v2/AccountVolume.json new file mode 100644 index 00000000..36aa7fb0 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/AccountVolume.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "volume", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/ActiveGrant.json b/source/json_tables/injective/exchange/v2/ActiveGrant.json new file mode 100644 index 00000000..205af3b9 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ActiveGrant.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/AdminInfo.json b/source/json_tables/injective/exchange/v2/AdminInfo.json new file mode 100644 index 00000000..33151f36 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/AdminInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "admin", + "Type": "string", + "Description": "" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/AggregateAccountVolumeRecord.json b/source/json_tables/injective/exchange/v2/AggregateAccountVolumeRecord.json new file mode 100644 index 00000000..4f513767 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/AggregateAccountVolumeRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "account the volume belongs to" + }, + { + "Parameter": "market_volumes", + "Type": "MarketVolume array", + "Description": "the aggregate volumes for each market" + } +] diff --git a/source/json_tables/injective/exchange/v2/AggregateSubaccountVolumeRecord.json b/source/json_tables/injective/exchange/v2/AggregateSubaccountVolumeRecord.json new file mode 100644 index 00000000..6b1a4235 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/AggregateSubaccountVolumeRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_volumes", + "Type": "MarketVolume array", + "Description": "the subaccount volumes for each market" + } +] diff --git a/source/json_tables/injective/exchange/v2/AtomicMarketOrderAccessLevel.json b/source/json_tables/injective/exchange/v2/AtomicMarketOrderAccessLevel.json new file mode 100644 index 00000000..11d56718 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/AtomicMarketOrderAccessLevel.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "Nobody" + }, + { + "Code": "1", + "Name": "BeginBlockerSmartContractsOnly" + }, + { + "Code": "2", + "Name": "SmartContractsOnly" + }, + { + "Code": "3", + "Name": "Everyone" + } +] diff --git a/source/json_tables/injective/exchange/v2/AtomicMarketOrderFeeMultiplierScheduleProposal.json b/source/json_tables/injective/exchange/v2/AtomicMarketOrderFeeMultiplierScheduleProposal.json new file mode 100644 index 00000000..ec382d65 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/AtomicMarketOrderFeeMultiplierScheduleProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_fee_multipliers", + "Type": "MarketFeeMultiplier array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/Balance.json b/source/json_tables/injective/exchange/v2/Balance.json new file mode 100644 index 00000000..73b34047 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/Balance.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the balance" + }, + { + "Parameter": "deposits", + "Type": "Deposit", + "Description": "the token deposits details" + } +] diff --git a/source/json_tables/injective/exchange/v2/BalanceMismatch.json b/source/json_tables/injective/exchange/v2/BalanceMismatch.json new file mode 100644 index 00000000..48b0f136 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BalanceMismatch.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "subaccountId", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the balance" + }, + { + "Parameter": "available", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the available balance" + }, + { + "Parameter": "total", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the total balance" + }, + { + "Parameter": "balance_hold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the balance hold" + }, + { + "Parameter": "expected_total", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the expected total balance" + }, + { + "Parameter": "difference", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the difference between the total balance and the expected total balance" + } +] diff --git a/source/json_tables/injective/exchange/v2/BalanceWithMarginHold.json b/source/json_tables/injective/exchange/v2/BalanceWithMarginHold.json new file mode 100644 index 00000000..1631448e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BalanceWithMarginHold.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "subaccountId", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the balance" + }, + { + "Parameter": "available", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the available balance" + }, + { + "Parameter": "total", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the total balance" + }, + { + "Parameter": "balance_hold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the balance on hold" + } +] diff --git a/source/json_tables/injective/exchange/v2/BatchCancelDerivativeOrdersAuthz.json b/source/json_tables/injective/exchange/v2/BatchCancelDerivativeOrdersAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BatchCancelDerivativeOrdersAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/BatchCancelSpotOrdersAuthz.json b/source/json_tables/injective/exchange/v2/BatchCancelSpotOrdersAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BatchCancelSpotOrdersAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/BatchCommunityPoolSpendProposal.json b/source/json_tables/injective/exchange/v2/BatchCommunityPoolSpendProposal.json new file mode 100644 index 00000000..5c9a1f61 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BatchCommunityPoolSpendProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "proposals", + "Type": "types1.CommunityPoolSpendProposal array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/BatchCreateDerivativeLimitOrdersAuthz.json b/source/json_tables/injective/exchange/v2/BatchCreateDerivativeLimitOrdersAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BatchCreateDerivativeLimitOrdersAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/BatchCreateSpotLimitOrdersAuthz.json b/source/json_tables/injective/exchange/v2/BatchCreateSpotLimitOrdersAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BatchCreateSpotLimitOrdersAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/BatchExchangeModificationProposal.json b/source/json_tables/injective/exchange/v2/BatchExchangeModificationProposal.json new file mode 100644 index 00000000..2d4e09cd --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BatchExchangeModificationProposal.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "spot_market_param_update_proposals", + "Type": "SpotMarketParamUpdateProposal array", + "Description": "" + }, + { + "Parameter": "derivative_market_param_update_proposals", + "Type": "DerivativeMarketParamUpdateProposal array", + "Description": "" + }, + { + "Parameter": "spot_market_launch_proposals", + "Type": "SpotMarketLaunchProposal array", + "Description": "" + }, + { + "Parameter": "perpetual_market_launch_proposals", + "Type": "PerpetualMarketLaunchProposal array", + "Description": "" + }, + { + "Parameter": "expiry_futures_market_launch_proposals", + "Type": "ExpiryFuturesMarketLaunchProposal array", + "Description": "" + }, + { + "Parameter": "trading_reward_campaign_update_proposal", + "Type": "TradingRewardCampaignUpdateProposal", + "Description": "" + }, + { + "Parameter": "binary_options_market_launch_proposals", + "Type": "BinaryOptionsMarketLaunchProposal array", + "Description": "" + }, + { + "Parameter": "binary_options_param_update_proposals", + "Type": "BinaryOptionsMarketParamUpdateProposal array", + "Description": "" + }, + { + "Parameter": "denom_decimals_update_proposal", + "Type": "UpdateDenomDecimalsProposal", + "Description": "" + }, + { + "Parameter": "fee_discount_proposal", + "Type": "FeeDiscountProposal", + "Description": "" + }, + { + "Parameter": "market_forced_settlement_proposals", + "Type": "MarketForcedSettlementProposal array", + "Description": "" + }, + { + "Parameter": "denom_min_notional_proposal", + "Type": "DenomMinNotionalProposal", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/BatchUpdateOrdersAuthz.json b/source/json_tables/injective/exchange/v2/BatchUpdateOrdersAuthz.json new file mode 100644 index 00000000..d77ebd7b --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BatchUpdateOrdersAuthz.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "spot_markets", + "Type": "string array", + "Description": "the spot market IDs" + }, + { + "Parameter": "derivative_markets", + "Type": "string array", + "Description": "the derivative market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/BinaryOptionsMarket.json b/source/json_tables/injective/exchange/v2/BinaryOptionsMarket.json new file mode 100644 index 00000000..cbda1453 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BinaryOptionsMarket.json @@ -0,0 +1,102 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative contract." + }, + { + "Parameter": "oracle_symbol", + "Type": "string", + "Description": "Oracle symbol" + }, + { + "Parameter": "oracle_provider", + "Type": "string", + "Description": "Oracle Provider" + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "admin of the market" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Address of the quote currency denomination for the binary options contract" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Unique market ID." + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the maker fee rate of a binary options market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the taker fee rate of a derivative market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the percentage of the transaction fee shared with the relayer in a derivative market" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "Status of the market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price and margin required for orders in the market (in human readable format)" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market (in human readable format)" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "settlement_price defines the settlement price of the binary options market (in human readable format)" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "level of admin permissions" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + } +] diff --git a/source/json_tables/injective/exchange/v2/BinaryOptionsMarketLaunchProposal.json b/source/json_tables/injective/exchange/v2/BinaryOptionsMarketLaunchProposal.json new file mode 100644 index 00000000..d4e35f87 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BinaryOptionsMarketLaunchProposal.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative contract." + }, + { + "Parameter": "oracle_symbol", + "Type": "string", + "Description": "Oracle symbol" + }, + { + "Parameter": "oracle_provider", + "Type": "string", + "Description": "Oracle Provider" + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "admin of the market" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Address of the quote currency denomination for the binary options contract" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the maker fee rate of a binary options market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the taker fee rate of a derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price and margin required for orders in the market" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/BinaryOptionsMarketParamUpdateProposal.json b/source/json_tables/injective/exchange/v2/BinaryOptionsMarketParamUpdateProposal.json new file mode 100644 index 00000000..c94745ad --- /dev/null +++ b/source/json_tables/injective/exchange/v2/BinaryOptionsMarketParamUpdateProposal.json @@ -0,0 +1,82 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the exchange trade fee for makers for the derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the exchange trade fee for takers for the derivative market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the relayer fee share rate for the derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "new price at which market will be settled" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "admin of the market" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "" + }, + { + "Parameter": "oracle_params", + "Type": "ProviderOracleParams", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + } +] diff --git a/source/json_tables/injective/exchange/v2/CampaignRewardPool.json b/source/json_tables/injective/exchange/v2/CampaignRewardPool.json new file mode 100644 index 00000000..ad6bb73e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CampaignRewardPool.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "start_timestamp", + "Type": "int64", + "Description": "the campaign start timestamp in seconds" + }, + { + "Parameter": "max_campaign_rewards", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "max_campaign_rewards are the maximum reward amounts to be disbursed at the end of the campaign" + } +] diff --git a/source/json_tables/injective/exchange/v2/CancelDerivativeOrderAuthz.json b/source/json_tables/injective/exchange/v2/CancelDerivativeOrderAuthz.json new file mode 100644 index 00000000..2fe75c6e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CancelDerivativeOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/CancelSpotOrderAuthz.json b/source/json_tables/injective/exchange/v2/CancelSpotOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CancelSpotOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/CancellationStrategy.json b/source/json_tables/injective/exchange/v2/CancellationStrategy.json new file mode 100644 index 00000000..afc4191e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CancellationStrategy.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "UnspecifiedOrder" + }, + { + "Code": "1", + "Name": "FromWorstToBest" + }, + { + "Code": "2", + "Name": "FromBestToWorst" + } +] diff --git a/source/json_tables/injective/exchange/v2/ConditionalDerivativeOrderBook.json b/source/json_tables/injective/exchange/v2/ConditionalDerivativeOrderBook.json new file mode 100644 index 00000000..9b94d379 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ConditionalDerivativeOrderBook.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "limit_buy_orders", + "Type": "DerivativeLimitOrder array", + "Description": "" + }, + { + "Parameter": "market_buy_orders", + "Type": "DerivativeMarketOrder array", + "Description": "" + }, + { + "Parameter": "limit_sell_orders", + "Type": "DerivativeLimitOrder array", + "Description": "" + }, + { + "Parameter": "market_sell_orders", + "Type": "DerivativeMarketOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/CreateDerivativeLimitOrderAuthz.json b/source/json_tables/injective/exchange/v2/CreateDerivativeLimitOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CreateDerivativeLimitOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/CreateDerivativeMarketOrderAuthz.json b/source/json_tables/injective/exchange/v2/CreateDerivativeMarketOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CreateDerivativeMarketOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/CreateSpotLimitOrderAuthz.json b/source/json_tables/injective/exchange/v2/CreateSpotLimitOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CreateSpotLimitOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/CreateSpotMarketOrderAuthz.json b/source/json_tables/injective/exchange/v2/CreateSpotMarketOrderAuthz.json new file mode 100644 index 00000000..e2bab38c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CreateSpotMarketOrderAuthz.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "the market IDs" + } +] diff --git a/source/json_tables/injective/exchange/v2/DenomDecimals.json b/source/json_tables/injective/exchange/v2/DenomDecimals.json new file mode 100644 index 00000000..a515acb2 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DenomDecimals.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the token" + }, + { + "Parameter": "decimals", + "Type": "uint64", + "Description": "the decimals of the token" + } +] diff --git a/source/json_tables/injective/exchange/v2/DenomMinNotional.json b/source/json_tables/injective/exchange/v2/DenomMinNotional.json new file mode 100644 index 00000000..813ff054 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DenomMinNotional.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "the denom of the token" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the minimum notional value for the token (in human readable format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/DenomMinNotionalProposal.json b/source/json_tables/injective/exchange/v2/DenomMinNotionalProposal.json new file mode 100644 index 00000000..c438fe27 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DenomMinNotionalProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "denom_min_notionals", + "Type": "DenomMinNotional array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/Deposit.json b/source/json_tables/injective/exchange/v2/Deposit.json new file mode 100644 index 00000000..c1c41495 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/Deposit.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "available_balance", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the available balance (in chain format)" + }, + { + "Parameter": "total_balance", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the total balance (in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/DepositUpdate.json b/source/json_tables/injective/exchange/v2/DepositUpdate.json new file mode 100644 index 00000000..0eb82573 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DepositUpdate.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "deposits", + "Type": "SubaccountDeposit array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeLimitOrder.json b/source/json_tables/injective/exchange/v2/DerivativeLimitOrder.json new file mode 100644 index 00000000..c92fed88 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeLimitOrder.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin is the margin used by the limit order" + }, + { + "Parameter": "fillable", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "expiration_block", + "Type": "int64", + "Description": "expiration block is the block number at which the order will expire" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarket.json b/source/json_tables/injective/exchange/v2/DerivativeMarket.json new file mode 100644 index 00000000..f023a9b6 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeMarket.json @@ -0,0 +1,107 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative contract." + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Address of the quote currency denomination for the derivative contract" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Unique market ID." + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio of a derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio of a derivative market" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the maker fee rate of a derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the taker fee rate of a derivative market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the percentage of the transaction fee shared with the relayer in a derivative market" + }, + { + "Parameter": "isPerpetual", + "Type": "bool", + "Description": "true if the market is a perpetual market. false if the market is an expiry futures market" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "Status of the market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price and margin required for orders in the market (in human readable format)" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market (in human readable format)" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "current market admin" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "level of admin permissions" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + }, + { + "Parameter": "reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "reduce_margin_ratio defines the ratio of the margin that is reduced" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarketOrder.json b/source/json_tables/injective/exchange/v2/DerivativeMarketOrder.json new file mode 100644 index 00000000..0daaee26 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeMarketOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "margin_hold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarketOrderCancel.json b/source/json_tables/injective/exchange/v2/DerivativeMarketOrderCancel.json new file mode 100644 index 00000000..73e295a9 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeMarketOrderCancel.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_order", + "Type": "DerivativeMarketOrder", + "Description": "" + }, + { + "Parameter": "cancel_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarketOrderResults.json b/source/json_tables/injective/exchange/v2/DerivativeMarketOrderResults.json new file mode 100644 index 00000000..e5ca5362 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeMarketOrderResults.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "position_delta", + "Type": "PositionDelta", + "Description": "" + }, + { + "Parameter": "payout", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarketParamUpdateProposal.json b/source/json_tables/injective/exchange/v2/DerivativeMarketParamUpdateProposal.json new file mode 100644 index 00000000..e445795d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeMarketParamUpdateProposal.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio for the derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio for the derivative market" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the exchange trade fee for makers for the derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the exchange trade fee for takers for the derivative market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the relayer fee share rate for the derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "HourlyInterestRate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_interest_rate defines the hourly interest rate" + }, + { + "Parameter": "HourlyFundingRateCap", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_funding_rate_cap defines the maximum absolute value of the hourly funding rate" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "" + }, + { + "Parameter": "oracle_params", + "Type": "OracleParams", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + }, + { + "Parameter": "reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "reduce_margin_ratio defines the ratio of the margin that is reduced" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarketSettlementInfo.json b/source/json_tables/injective/exchange/v2/DerivativeMarketSettlementInfo.json new file mode 100644 index 00000000..1669f68a --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeMarketSettlementInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market ID." + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "settlement_price defines the settlement price" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeOrder.json b/source/json_tables/injective/exchange/v2/DerivativeOrder.json new file mode 100644 index 00000000..821e5213 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market_id represents the unique ID of the market" + }, + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin is the margin used by the limit order (in human readable format)" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders (in human readable format) (optional)" + }, + { + "Parameter": "expiration_block", + "Type": "int64", + "Description": "expiration block is the block number at which the order will expire" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeOrderBook.json b/source/json_tables/injective/exchange/v2/DerivativeOrderBook.json new file mode 100644 index 00000000..04b0513b --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeOrderBook.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "isBuySide", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "orders", + "Type": "DerivativeLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeOrderV2Changes.json b/source/json_tables/injective/exchange/v2/DerivativeOrderV2Changes.json new file mode 100644 index 00000000..9d8336e4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeOrderV2Changes.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "cid", + "Type": "string", + "Description": "" + }, + { + "Parameter": "hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "p", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order" + }, + { + "Parameter": "q", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order" + }, + { + "Parameter": "m", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin of the order" + }, + { + "Parameter": "f", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable" + }, + { + "Parameter": "tp", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger price of the order" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativePosition.json b/source/json_tables/injective/exchange/v2/DerivativePosition.json new file mode 100644 index 00000000..8c4a0dd9 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativePosition.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "position", + "Type": "Position", + "Description": "the position details" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeTradeLog.json b/source/json_tables/injective/exchange/v2/DerivativeTradeLog.json new file mode 100644 index 00000000..0588fa9f --- /dev/null +++ b/source/json_tables/injective/exchange/v2/DerivativeTradeLog.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "position_delta", + "Type": "PositionDelta", + "Description": "" + }, + { + "Parameter": "payout", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "fee_recipient_address", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + }, + { + "Parameter": "pnl", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/EffectiveGrant.json b/source/json_tables/injective/exchange/v2/EffectiveGrant.json new file mode 100644 index 00000000..03e7bd1e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/EffectiveGrant.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "" + }, + { + "Parameter": "net_granted_stake", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "is_valid", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/EffectivePosition.json b/source/json_tables/injective/exchange/v2/EffectivePosition.json new file mode 100644 index 00000000..b7724914 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/EffectivePosition.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "is_long", + "Type": "bool", + "Description": "whether the position is long or short" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the position (in human readable format)" + }, + { + "Parameter": "entry_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the entry price of the position (in human readable format)" + }, + { + "Parameter": "effective_margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the effective margin of the position (in human readable format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/ExchangeEnableProposal.json b/source/json_tables/injective/exchange/v2/ExchangeEnableProposal.json new file mode 100644 index 00000000..313fa7bb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ExchangeEnableProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "exchangeType", + "Type": "ExchangeType", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/ExchangeType.json b/source/json_tables/injective/exchange/v2/ExchangeType.json new file mode 100644 index 00000000..fb478d6d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ExchangeType.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "EXCHANGE_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "SPOT" + }, + { + "Code": "2", + "Name": "DERIVATIVES" + } +] diff --git a/source/json_tables/injective/exchange/v2/ExecutionType.json b/source/json_tables/injective/exchange/v2/ExecutionType.json new file mode 100644 index 00000000..59644573 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ExecutionType.json @@ -0,0 +1,30 @@ +[ + { + "Code": "0", + "Name": "UnspecifiedExecutionType" + }, + { + "Code": "1", + "Name": "Market" + }, + { + "Code": "2", + "Name": "LimitFill" + }, + { + "Code": "3", + "Name": "LimitMatchRestingOrder" + }, + { + "Code": "4", + "Name": "LimitMatchNewOrder" + }, + { + "Code": "5", + "Name": "MarketLiquidation" + }, + { + "Code": "6", + "Name": "ExpiryMarketSettlement" + } +] diff --git a/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketInfo.json b/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketInfo.json new file mode 100644 index 00000000..1606a03b --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketInfo.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market ID." + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration_timestamp defines the expiration time for a time expiry futures market." + }, + { + "Parameter": "twap_start_timestamp", + "Type": "int64", + "Description": "expiration_twap_start_timestamp defines the start time of the TWAP calculation window" + }, + { + "Parameter": "expiration_twap_start_price_cumulative", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "expiration_twap_start_price_cumulative defines the cumulative price for the start of the TWAP window (in human readable format)" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "settlement_price defines the settlement price for a time expiry futures market (in human readable format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketInfoState.json b/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketInfoState.json new file mode 100644 index 00000000..81e22009 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketInfoState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_info", + "Type": "ExpiryFuturesMarketInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketLaunchProposal.json b/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketLaunchProposal.json new file mode 100644 index 00000000..0b8beafa --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketLaunchProposal.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative market." + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the quote currency" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "expiry", + "Type": "int64", + "Description": "Expiration time of the market" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio for the derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio for the derivative market" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the exchange trade fee for makers for the derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the exchange trade fee for takers for the derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + }, + { + "Parameter": "reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "reduce_margin_ratio defines the ratio of the margin that is reduced" + } +] diff --git a/source/json_tables/injective/exchange/v2/FeeDiscountAccountTierTTL.json b/source/json_tables/injective/exchange/v2/FeeDiscountAccountTierTTL.json new file mode 100644 index 00000000..708c0adc --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FeeDiscountAccountTierTTL.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "tier_ttl", + "Type": "FeeDiscountTierTTL", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/FeeDiscountBucketVolumeAccounts.json b/source/json_tables/injective/exchange/v2/FeeDiscountBucketVolumeAccounts.json new file mode 100644 index 00000000..400a652c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FeeDiscountBucketVolumeAccounts.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "bucket_start_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "account_volume", + "Type": "AccountVolume array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/FeeDiscountProposal.json b/source/json_tables/injective/exchange/v2/FeeDiscountProposal.json new file mode 100644 index 00000000..5c19b391 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FeeDiscountProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "schedule", + "Type": "FeeDiscountSchedule", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/FeeDiscountSchedule.json b/source/json_tables/injective/exchange/v2/FeeDiscountSchedule.json new file mode 100644 index 00000000..87f00500 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FeeDiscountSchedule.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "bucket_count", + "Type": "uint64", + "Description": "the bucket number" + }, + { + "Parameter": "bucket_duration", + "Type": "int64", + "Description": "the bucket duration in seconds" + }, + { + "Parameter": "quote_denoms", + "Type": "string array", + "Description": "the trading fee quote denoms which will be counted for the fee paid contribution" + }, + { + "Parameter": "tier_infos", + "Type": "FeeDiscountTierInfo array", + "Description": "the fee discount tiers" + }, + { + "Parameter": "disqualified_market_ids", + "Type": "string array", + "Description": "the marketIDs which are disqualified from contributing to the fee paid amount" + } +] diff --git a/source/json_tables/injective/exchange/v2/FeeDiscountTierInfo.json b/source/json_tables/injective/exchange/v2/FeeDiscountTierInfo.json new file mode 100644 index 00000000..c6f407ea --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FeeDiscountTierInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "maker_discount_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the maker discount rate" + }, + { + "Parameter": "taker_discount_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the taker discount rate" + }, + { + "Parameter": "staked_amount", + "Type": "cosmossdk_io_math.Int", + "Description": "the staked amount required to qualify for the discount (in chain format)" + }, + { + "Parameter": "volume", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the volume required to qualify for the discount (in human readable format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/FeeDiscountTierTTL.json b/source/json_tables/injective/exchange/v2/FeeDiscountTierTTL.json new file mode 100644 index 00000000..76e7ef88 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FeeDiscountTierTTL.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "tier", + "Type": "uint64", + "Description": "the tier number" + }, + { + "Parameter": "ttl_timestamp", + "Type": "int64", + "Description": "the TTL timestamp in seconds" + } +] diff --git a/source/json_tables/injective/exchange/v2/FullActiveGrant.json b/source/json_tables/injective/exchange/v2/FullActiveGrant.json new file mode 100644 index 00000000..f5aa37c4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FullActiveGrant.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "grantee", + "Type": "string", + "Description": "" + }, + { + "Parameter": "active_grant", + "Type": "ActiveGrant", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/FullDerivativeMarket.json b/source/json_tables/injective/exchange/v2/FullDerivativeMarket.json new file mode 100644 index 00000000..45987520 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FullDerivativeMarket.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market", + "Type": "DerivativeMarket", + "Description": "derivative market details" + }, + { + "Parameter": "mark_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "mark price (in human readable format)" + }, + { + "Parameter": "mid_price_and_tob", + "Type": "MidPriceAndTOB", + "Description": "mid_price_and_tob defines the mid price for this market and the best ask and bid orders" + }, + { + "Parameter": "perpetual_info", + "Type": "PerpetualMarketState", + "Description": "" + }, + { + "Parameter": "futures_info", + "Type": "ExpiryFuturesMarketInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/FullGrantAuthorizations.json b/source/json_tables/injective/exchange/v2/FullGrantAuthorizations.json new file mode 100644 index 00000000..a13c7858 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FullGrantAuthorizations.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "" + }, + { + "Parameter": "total_grant_amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "last_delegations_checked_time", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "grants", + "Type": "GrantAuthorization array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/FullSpotMarket.json b/source/json_tables/injective/exchange/v2/FullSpotMarket.json new file mode 100644 index 00000000..d580f34a --- /dev/null +++ b/source/json_tables/injective/exchange/v2/FullSpotMarket.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market", + "Type": "SpotMarket", + "Description": "spot market details" + }, + { + "Parameter": "mid_price_and_tob", + "Type": "MidPriceAndTOB", + "Description": "mid_price_and_tob defines the mid price for this market and the best ask and bid orders" + } +] diff --git a/source/json_tables/injective/exchange/v2/GenericExchangeAuthorization.json b/source/json_tables/injective/exchange/v2/GenericExchangeAuthorization.json new file mode 100644 index 00000000..0b497d37 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/GenericExchangeAuthorization.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "msg", + "Type": "string", + "Description": "Msg, identified by it's type URL, to grant permissions to the grantee" + }, + { + "Parameter": "spend_limit", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "SpendLimit is the maximum amount of tokens that the grantee can spend on behalf of the granter. If not set, there is no spend limit." + } +] diff --git a/source/json_tables/injective/exchange/v2/GenesisState.json b/source/json_tables/injective/exchange/v2/GenesisState.json new file mode 100644 index 00000000..c7e3201c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/GenesisState.json @@ -0,0 +1,187 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of related to exchange." + }, + { + "Parameter": "spot_markets", + "Type": "SpotMarket array", + "Description": "spot_markets is an array containing the genesis trade pairs" + }, + { + "Parameter": "derivative_markets", + "Type": "DerivativeMarket array", + "Description": "derivative_markets is an array containing the genesis derivative markets" + }, + { + "Parameter": "spot_orderbook", + "Type": "SpotOrderBook array", + "Description": "spot_orderbook defines the spot exchange limit orderbook active at genesis." + }, + { + "Parameter": "derivative_orderbook", + "Type": "DerivativeOrderBook array", + "Description": "derivative_orderbook defines the derivative exchange limit orderbook active at genesis." + }, + { + "Parameter": "balances", + "Type": "Balance array", + "Description": "balances defines the exchange users balances active at genesis." + }, + { + "Parameter": "positions", + "Type": "DerivativePosition array", + "Description": "positions defines the exchange derivative positions at genesis" + }, + { + "Parameter": "subaccount_trade_nonces", + "Type": "SubaccountNonce array", + "Description": "subaccount_trade_nonces defines the subaccount trade nonces for the subaccounts at genesis" + }, + { + "Parameter": "expiry_futures_market_info_state", + "Type": "ExpiryFuturesMarketInfoState array", + "Description": "expiry_futures_market_info defines the market info for the expiry futures markets at genesis" + }, + { + "Parameter": "perpetual_market_info", + "Type": "PerpetualMarketInfo array", + "Description": "perpetual_market_info defines the market info for the perpetual derivative markets at genesis" + }, + { + "Parameter": "perpetual_market_funding_state", + "Type": "PerpetualMarketFundingState array", + "Description": "perpetual_market_funding_state defines the funding state for the perpetual derivative markets at genesis" + }, + { + "Parameter": "derivative_market_settlement_scheduled", + "Type": "DerivativeMarketSettlementInfo array", + "Description": "derivative_market_settlement_scheduled defines the scheduled markets for settlement at genesis" + }, + { + "Parameter": "is_spot_exchange_enabled", + "Type": "bool", + "Description": "sets spot markets as enabled" + }, + { + "Parameter": "is_derivatives_exchange_enabled", + "Type": "bool", + "Description": "sets derivative markets as enabled" + }, + { + "Parameter": "trading_reward_campaign_info", + "Type": "TradingRewardCampaignInfo", + "Description": "the current trading reward campaign info" + }, + { + "Parameter": "trading_reward_pool_campaign_schedule", + "Type": "CampaignRewardPool array", + "Description": "the current and upcoming trading reward campaign pools" + }, + { + "Parameter": "trading_reward_campaign_account_points", + "Type": "TradingRewardCampaignAccountPoints array", + "Description": "the current trading reward account points" + }, + { + "Parameter": "fee_discount_schedule", + "Type": "FeeDiscountSchedule", + "Description": "the fee discount schedule" + }, + { + "Parameter": "fee_discount_account_tier_ttl", + "Type": "FeeDiscountAccountTierTTL array", + "Description": "the cached fee discount account tiers with TTL" + }, + { + "Parameter": "fee_discount_bucket_volume_accounts", + "Type": "FeeDiscountBucketVolumeAccounts array", + "Description": "the fee discount paid by accounts in all buckets" + }, + { + "Parameter": "is_first_fee_cycle_finished", + "Type": "bool", + "Description": "sets the first fee cycle as finished" + }, + { + "Parameter": "pending_trading_reward_pool_campaign_schedule", + "Type": "CampaignRewardPool array", + "Description": "the current and upcoming trading reward campaign pending pools" + }, + { + "Parameter": "pending_trading_reward_campaign_account_points", + "Type": "TradingRewardCampaignAccountPendingPoints array", + "Description": "the pending trading reward account points" + }, + { + "Parameter": "rewards_opt_out_addresses", + "Type": "string array", + "Description": "the addresses opting out of trading rewards" + }, + { + "Parameter": "historical_trade_records", + "Type": "TradeRecords array", + "Description": "" + }, + { + "Parameter": "binary_options_markets", + "Type": "BinaryOptionsMarket array", + "Description": "binary_options_markets is an array containing the genesis binary options markets" + }, + { + "Parameter": "binary_options_market_ids_scheduled_for_settlement", + "Type": "string array", + "Description": "binary_options_markets_scheduled_for_settlement contains the marketIDs of binary options markets scheduled for next-block settlement" + }, + { + "Parameter": "spot_market_ids_scheduled_to_force_close", + "Type": "string array", + "Description": "spot_market_ids_scheduled_to_force_close defines the scheduled markets for forced closings at genesis" + }, + { + "Parameter": "denom_decimals", + "Type": "DenomDecimals array", + "Description": "denom_decimals defines the denom decimals for the exchange." + }, + { + "Parameter": "conditional_derivative_orderbooks", + "Type": "ConditionalDerivativeOrderBook array", + "Description": "conditional_derivative_orderbook contains conditional orderbooks for all markets (both lmit and market conditional orders)" + }, + { + "Parameter": "market_fee_multipliers", + "Type": "MarketFeeMultiplier array", + "Description": "market_fee_multipliers contains any non-default atomic order fee multipliers" + }, + { + "Parameter": "orderbook_sequences", + "Type": "OrderbookSequence array", + "Description": "" + }, + { + "Parameter": "subaccount_volumes", + "Type": "AggregateSubaccountVolumeRecord array", + "Description": "" + }, + { + "Parameter": "market_volumes", + "Type": "MarketVolume array", + "Description": "" + }, + { + "Parameter": "grant_authorizations", + "Type": "FullGrantAuthorizations array", + "Description": "" + }, + { + "Parameter": "active_grants", + "Type": "FullActiveGrant array", + "Description": "" + }, + { + "Parameter": "denom_min_notionals", + "Type": "DenomMinNotional array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/GrantAuthorization.json b/source/json_tables/injective/exchange/v2/GrantAuthorization.json new file mode 100644 index 00000000..d871bf36 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/GrantAuthorization.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "grantee", + "Type": "string", + "Description": "the grantee address" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "the amount of stake granted (INJ in chain format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/Level.json b/source/json_tables/injective/exchange/v2/Level.json new file mode 100644 index 00000000..036dd47e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/Level.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "p", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price (in human readable format)" + }, + { + "Parameter": "q", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity (in human readable format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/MarketBalance.json b/source/json_tables/injective/exchange/v2/MarketBalance.json new file mode 100644 index 00000000..2b71fb8f --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MarketBalance.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "balance", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the current balance of the market" + } +] diff --git a/source/json_tables/injective/exchange/v2/MarketFeeMultiplier.json b/source/json_tables/injective/exchange/v2/MarketFeeMultiplier.json new file mode 100644 index 00000000..fe282927 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MarketFeeMultiplier.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MarketForcedSettlementProposal.json b/source/json_tables/injective/exchange/v2/MarketForcedSettlementProposal.json new file mode 100644 index 00000000..7872f360 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MarketForcedSettlementProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MarketOrderIndicator.json b/source/json_tables/injective/exchange/v2/MarketOrderIndicator.json new file mode 100644 index 00000000..9d3176b9 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MarketOrderIndicator.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market_id represents the unique ID of the market" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MarketStatus.json b/source/json_tables/injective/exchange/v2/MarketStatus.json new file mode 100644 index 00000000..2cf70b03 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MarketStatus.json @@ -0,0 +1,22 @@ +[ + { + "Code": "0", + "Name": "Unspecified" + }, + { + "Code": "1", + "Name": "Active" + }, + { + "Code": "2", + "Name": "Paused" + }, + { + "Code": "3", + "Name": "Demolished" + }, + { + "Code": "4", + "Name": "Expired" + } +] diff --git a/source/json_tables/injective/exchange/v2/MarketVolume.json b/source/json_tables/injective/exchange/v2/MarketVolume.json new file mode 100644 index 00000000..79a37b0a --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MarketVolume.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "volume", + "Type": "VolumeRecord", + "Description": "the market volume" + } +] diff --git a/source/json_tables/injective/exchange/v2/MidPriceAndTOB.json b/source/json_tables/injective/exchange/v2/MidPriceAndTOB.json new file mode 100644 index 00000000..2845d2af --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MidPriceAndTOB.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "mid_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "mid price of the market (in human readable format)" + }, + { + "Parameter": "best_buy_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best buy price of the market (in human readable format)" + }, + { + "Parameter": "best_sell_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best sell price of the market (in human readable format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/MitoVaultInfosResponse.json b/source/json_tables/injective/exchange/v2/MitoVaultInfosResponse.json new file mode 100644 index 00000000..110acdd2 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MitoVaultInfosResponse.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "master_addresses", + "Type": "string array", + "Description": "list of master addresses" + }, + { + "Parameter": "derivative_addresses", + "Type": "string array", + "Description": "list of derivative addresses" + }, + { + "Parameter": "spot_addresses", + "Type": "string array", + "Description": "list of spot addresses" + }, + { + "Parameter": "cw20_addresses", + "Type": "string array", + "Description": "list of cw20 addresses" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgActivateStakeGrant.json b/source/json_tables/injective/exchange/v2/MsgActivateStakeGrant.json new file mode 100644 index 00000000..3e8a387e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgActivateStakeGrant.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Injective address of the stake grantee", + "Required": "Yes" + }, + { + "Parameter": "granter", + "Type": "string", + "Description": "Injective address of the stake granter", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgAdminUpdateBinaryOptionsMarket.json b/source/json_tables/injective/exchange/v2/MsgAdminUpdateBinaryOptionsMarket.json new file mode 100644 index 00000000..9f73d551 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgAdminUpdateBinaryOptionsMarket.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "The sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "The market ID", + "Required": "Yes" + }, + { + "Parameter": "settlement_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "new price at which market will be settled", + "Required": "No" + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp", + "Required": "Yes" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp", + "Required": "Yes" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "Status of the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgAtomicMarketOrderFeeMultiplierSchedule.json b/source/json_tables/injective/exchange/v2/MsgAtomicMarketOrderFeeMultiplierSchedule.json new file mode 100644 index 00000000..eccdcb02 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgAtomicMarketOrderFeeMultiplierSchedule.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "AtomicMarketOrderFeeMultiplierScheduleProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgAuthorizeStakeGrants.json b/source/json_tables/injective/exchange/v2/MsgAuthorizeStakeGrants.json new file mode 100644 index 00000000..87c300ff --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgAuthorizeStakeGrants.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Injective address of the stake granter", + "Required": "Yes" + }, + { + "Parameter": "grants", + "Type": "GrantAuthorization array", + "Description": "list of stake grants to authorize (mandatory)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCancelBinaryOptionsOrders.json b/source/json_tables/injective/exchange/v2/MsgBatchCancelBinaryOptionsOrders.json new file mode 100644 index 00000000..c482900d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCancelBinaryOptionsOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "OrderData array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCancelBinaryOptionsOrdersResponse.json b/source/json_tables/injective/exchange/v2/MsgBatchCancelBinaryOptionsOrdersResponse.json new file mode 100644 index 00000000..bf514378 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCancelBinaryOptionsOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCancelDerivativeOrders.json b/source/json_tables/injective/exchange/v2/MsgBatchCancelDerivativeOrders.json new file mode 100644 index 00000000..c482900d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCancelDerivativeOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "OrderData array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCancelDerivativeOrdersResponse.json b/source/json_tables/injective/exchange/v2/MsgBatchCancelDerivativeOrdersResponse.json new file mode 100644 index 00000000..bf514378 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCancelDerivativeOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCancelSpotOrders.json b/source/json_tables/injective/exchange/v2/MsgBatchCancelSpotOrders.json new file mode 100644 index 00000000..c482900d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCancelSpotOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "OrderData array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCancelSpotOrdersResponse.json b/source/json_tables/injective/exchange/v2/MsgBatchCancelSpotOrdersResponse.json new file mode 100644 index 00000000..bf514378 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCancelSpotOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "success", + "Type": "bool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCommunityPoolSpend.json b/source/json_tables/injective/exchange/v2/MsgBatchCommunityPoolSpend.json new file mode 100644 index 00000000..29e2491e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCommunityPoolSpend.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "BatchCommunityPoolSpendProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCreateDerivativeLimitOrders.json b/source/json_tables/injective/exchange/v2/MsgBatchCreateDerivativeLimitOrders.json new file mode 100644 index 00000000..2a4d346d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCreateDerivativeLimitOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "orders", + "Type": "DerivativeOrder array", + "Description": "the orders to create", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCreateDerivativeLimitOrdersResponse.json b/source/json_tables/injective/exchange/v2/MsgBatchCreateDerivativeLimitOrdersResponse.json new file mode 100644 index 00000000..4e84fa8d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCreateDerivativeLimitOrdersResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_orders_cids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCreateSpotLimitOrders.json b/source/json_tables/injective/exchange/v2/MsgBatchCreateSpotLimitOrders.json new file mode 100644 index 00000000..8231c765 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCreateSpotLimitOrders.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orders", + "Type": "SpotOrder array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchCreateSpotLimitOrdersResponse.json b/source/json_tables/injective/exchange/v2/MsgBatchCreateSpotLimitOrdersResponse.json new file mode 100644 index 00000000..4e84fa8d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchCreateSpotLimitOrdersResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_orders_cids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchExchangeModification.json b/source/json_tables/injective/exchange/v2/MsgBatchExchangeModification.json new file mode 100644 index 00000000..357d491d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchExchangeModification.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "BatchExchangeModificationProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchUpdateOrders.json b/source/json_tables/injective/exchange/v2/MsgBatchUpdateOrders.json new file mode 100644 index 00000000..4f85c6ff --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchUpdateOrders.json @@ -0,0 +1,68 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccount_id only used for the spot_market_ids_to_cancel_all and derivative_market_ids_to_cancel_all (optional)", + "Required": "No" + }, + { + "Parameter": "spot_market_ids_to_cancel_all", + "Type": "string array", + "Description": "the market IDs to cancel all spot orders for (optional)", + "Required": "No" + }, + { + "Parameter": "derivative_market_ids_to_cancel_all", + "Type": "string array", + "Description": "the market IDs to cancel all derivative orders for (optional)", + "Required": "No" + }, + { + "Parameter": "spot_orders_to_cancel", + "Type": "OrderData array", + "Description": "the spot orders to cancel", + "Required": "No" + }, + { + "Parameter": "derivative_orders_to_cancel", + "Type": "OrderData array", + "Description": "the derivative orders to cancel", + "Required": "No" + }, + { + "Parameter": "spot_orders_to_create", + "Type": "SpotOrder array", + "Description": "the spot orders to create", + "Required": "No" + }, + { + "Parameter": "derivative_orders_to_create", + "Type": "DerivativeOrder array", + "Description": "the derivative orders to create", + "Required": "No" + }, + { + "Parameter": "binary_options_orders_to_cancel", + "Type": "OrderData array", + "Description": "the binary options orders to cancel", + "Required": "No" + }, + { + "Parameter": "binary_options_market_ids_to_cancel_all", + "Type": "string array", + "Description": "the market IDs to cancel all binary options orders for (optional)", + "Required": "No" + }, + { + "Parameter": "binary_options_orders_to_create", + "Type": "DerivativeOrder array", + "Description": "the binary options orders to create", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchUpdateOrdersResponse.json b/source/json_tables/injective/exchange/v2/MsgBatchUpdateOrdersResponse.json new file mode 100644 index 00000000..51f2b585 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchUpdateOrdersResponse.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "spot_cancel_success", + "Type": "bool array", + "Description": "" + }, + { + "Parameter": "derivative_cancel_success", + "Type": "bool array", + "Description": "" + }, + { + "Parameter": "spot_order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "derivative_order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "binary_options_cancel_success", + "Type": "bool array", + "Description": "" + }, + { + "Parameter": "binary_options_order_hashes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_spot_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_spot_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_derivative_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_derivative_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "created_binary_options_orders_cids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "failed_binary_options_orders_cids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBinaryOptionsMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgBinaryOptionsMarketLaunch.json new file mode 100644 index 00000000..5ce4c7e4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBinaryOptionsMarketLaunch.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "BinaryOptionsMarketLaunchProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBinaryOptionsMarketParamUpdate.json b/source/json_tables/injective/exchange/v2/MsgBinaryOptionsMarketParamUpdate.json new file mode 100644 index 00000000..49872330 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBinaryOptionsMarketParamUpdate.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "BinaryOptionsMarketParamUpdateProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCancelBinaryOptionsOrder.json b/source/json_tables/injective/exchange/v2/MsgCancelBinaryOptionsOrder.json new file mode 100644 index 00000000..2fa80cd0 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCancelBinaryOptionsOrder.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash (optional)", + "Required": "No" + }, + { + "Parameter": "order_mask", + "Type": "int32", + "Description": "the order mask (bitwise combination of OrderMask enum values) (optional)", + "Required": "No" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional)", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCancelDerivativeOrder.json b/source/json_tables/injective/exchange/v2/MsgCancelDerivativeOrder.json new file mode 100644 index 00000000..2fa80cd0 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCancelDerivativeOrder.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash (optional)", + "Required": "No" + }, + { + "Parameter": "order_mask", + "Type": "int32", + "Description": "the order mask (bitwise combination of OrderMask enum values) (optional)", + "Required": "No" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional)", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCancelSpotOrder.json b/source/json_tables/injective/exchange/v2/MsgCancelSpotOrder.json new file mode 100644 index 00000000..42d3465d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCancelSpotOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash (optional)", + "Required": "No" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional)", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsLimitOrder.json b/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsLimitOrder.json new file mode 100644 index 00000000..1e2893cb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsLimitOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "the order details", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsLimitOrderResponse.json b/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsLimitOrderResponse.json new file mode 100644 index 00000000..54de12eb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsLimitOrderResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsMarketOrder.json b/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsMarketOrder.json new file mode 100644 index 00000000..1e2893cb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsMarketOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "the order details", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsMarketOrderResponse.json b/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsMarketOrderResponse.json new file mode 100644 index 00000000..44aa9ae1 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateBinaryOptionsMarketOrderResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "results", + "Type": "DerivativeMarketOrderResults", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateDerivativeLimitOrder.json b/source/json_tables/injective/exchange/v2/MsgCreateDerivativeLimitOrder.json new file mode 100644 index 00000000..1e2893cb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateDerivativeLimitOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "the order details", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateDerivativeLimitOrderResponse.json b/source/json_tables/injective/exchange/v2/MsgCreateDerivativeLimitOrderResponse.json new file mode 100644 index 00000000..54de12eb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateDerivativeLimitOrderResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateDerivativeMarketOrder.json b/source/json_tables/injective/exchange/v2/MsgCreateDerivativeMarketOrder.json new file mode 100644 index 00000000..1e2893cb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateDerivativeMarketOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "the order details", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateDerivativeMarketOrderResponse.json b/source/json_tables/injective/exchange/v2/MsgCreateDerivativeMarketOrderResponse.json new file mode 100644 index 00000000..44aa9ae1 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateDerivativeMarketOrderResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "results", + "Type": "DerivativeMarketOrderResults", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateSpotLimitOrder.json b/source/json_tables/injective/exchange/v2/MsgCreateSpotLimitOrder.json new file mode 100644 index 00000000..ae6a008e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateSpotLimitOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "SpotOrder", + "Description": "the order details", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateSpotLimitOrderResponse.json b/source/json_tables/injective/exchange/v2/MsgCreateSpotLimitOrderResponse.json new file mode 100644 index 00000000..54de12eb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateSpotLimitOrderResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateSpotMarketOrder.json b/source/json_tables/injective/exchange/v2/MsgCreateSpotMarketOrder.json new file mode 100644 index 00000000..ae6a008e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateSpotMarketOrder.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "SpotOrder", + "Description": "the order details", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgCreateSpotMarketOrderResponse.json b/source/json_tables/injective/exchange/v2/MsgCreateSpotMarketOrderResponse.json new file mode 100644 index 00000000..a6cfe812 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgCreateSpotMarketOrderResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "results", + "Type": "SpotMarketOrderResults", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgDecreasePositionMargin.json b/source/json_tables/injective/exchange/v2/MsgDecreasePositionMargin.json new file mode 100644 index 00000000..715da2be --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgDecreasePositionMargin.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "source_subaccount_id", + "Type": "string", + "Description": "the subaccount ID the position belongs to", + "Required": "Yes" + }, + { + "Parameter": "destination_subaccount_id", + "Type": "string", + "Description": "the destination subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "amount defines the amount of margin to withdraw from the position (in human readable format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgDeposit.json b/source/json_tables/injective/exchange/v2/MsgDeposit.json new file mode 100644 index 00000000..87dc558a --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgDeposit.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "(Optional) the subaccount ID to deposit funds into. If empty, the coin will be deposited to the sender's default subaccount address.", + "Required": "No" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "the amount of the deposit (in chain format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgDerivativeMarketParamUpdate.json b/source/json_tables/injective/exchange/v2/MsgDerivativeMarketParamUpdate.json new file mode 100644 index 00000000..d5713600 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgDerivativeMarketParamUpdate.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "DerivativeMarketParamUpdateProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgEmergencySettleMarket.json b/source/json_tables/injective/exchange/v2/MsgEmergencySettleMarket.json new file mode 100644 index 00000000..4f961683 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgEmergencySettleMarket.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgExchangeEnable.json b/source/json_tables/injective/exchange/v2/MsgExchangeEnable.json new file mode 100644 index 00000000..e362b5a0 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgExchangeEnable.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "ExchangeEnableProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgExpiryFuturesMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgExpiryFuturesMarketLaunch.json new file mode 100644 index 00000000..cc765b9c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgExpiryFuturesMarketLaunch.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "ExpiryFuturesMarketLaunchProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgExternalTransfer.json b/source/json_tables/injective/exchange/v2/MsgExternalTransfer.json new file mode 100644 index 00000000..88d91ffa --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgExternalTransfer.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "source_subaccount_id", + "Type": "string", + "Description": "the source subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "destination_subaccount_id", + "Type": "string", + "Description": "the destination subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "the amount to transfer (in chain format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgFeeDiscount.json b/source/json_tables/injective/exchange/v2/MsgFeeDiscount.json new file mode 100644 index 00000000..b84e5dc2 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgFeeDiscount.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "FeeDiscountProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgIncreasePositionMargin.json b/source/json_tables/injective/exchange/v2/MsgIncreasePositionMargin.json new file mode 100644 index 00000000..786d0758 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgIncreasePositionMargin.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "source_subaccount_id", + "Type": "string", + "Description": "the subaccount ID sending the funds", + "Required": "Yes" + }, + { + "Parameter": "destination_subaccount_id", + "Type": "string", + "Description": "the subaccount ID the position belongs to", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "amount defines the amount of margin to add to the position (in human readable format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgInstantBinaryOptionsMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgInstantBinaryOptionsMarketLaunch.json new file mode 100644 index 00000000..f5b95331 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgInstantBinaryOptionsMarketLaunch.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative contract.", + "Required": "Yes" + }, + { + "Parameter": "oracle_symbol", + "Type": "string", + "Description": "Oracle symbol", + "Required": "Yes" + }, + { + "Parameter": "oracle_provider", + "Type": "string", + "Description": "Oracle Provider", + "Required": "Yes" + }, + { + "Parameter": "oracle_type", + "Type": "types1.OracleType", + "Description": "Oracle type", + "Required": "Yes" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices.", + "Required": "Yes" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the trade fee rate for makers on the perpetual market", + "Required": "Yes" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the trade fee rate for takers on the perpetual market", + "Required": "Yes" + }, + { + "Parameter": "expiration_timestamp", + "Type": "int64", + "Description": "expiration timestamp", + "Required": "Yes" + }, + { + "Parameter": "settlement_timestamp", + "Type": "int64", + "Description": "expiration timestamp", + "Required": "Yes" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "admin of the market", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Address of the quote currency denomination for the binary options contract", + "Required": "Yes" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price and margin required for orders in the market (in human readable format)", + "Required": "Yes" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market (in human readable format)", + "Required": "Yes" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgInstantExpiryFuturesMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgInstantExpiryFuturesMarketLaunch.json new file mode 100644 index 00000000..4b43f5e3 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgInstantExpiryFuturesMarketLaunch.json @@ -0,0 +1,98 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative market.", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the quote currency", + "Required": "Yes" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency", + "Required": "Yes" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency", + "Required": "Yes" + }, + { + "Parameter": "oracle_type", + "Type": "types1.OracleType", + "Description": "Oracle type", + "Required": "Yes" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices.", + "Required": "Yes" + }, + { + "Parameter": "expiry", + "Type": "int64", + "Description": "Expiration time of the market", + "Required": "Yes" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the trade fee rate for makers on the expiry futures market", + "Required": "Yes" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the trade fee rate for takers on the expiry futures market", + "Required": "Yes" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio for the derivative market", + "Required": "Yes" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio for the derivative market", + "Required": "Yes" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin", + "Required": "Yes" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity", + "Required": "Yes" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market", + "Required": "Yes" + }, + { + "Parameter": "reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "reduce_margin_ratio defines the ratio of the margin that is reduced", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgInstantPerpetualMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgInstantPerpetualMarketLaunch.json new file mode 100644 index 00000000..7e131d77 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgInstantPerpetualMarketLaunch.json @@ -0,0 +1,92 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative market.", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the base currency", + "Required": "Yes" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency", + "Required": "Yes" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency", + "Required": "Yes" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices.", + "Required": "Yes" + }, + { + "Parameter": "oracle_type", + "Type": "types1.OracleType", + "Description": "Oracle type", + "Required": "Yes" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the trade fee rate for makers on the perpetual market", + "Required": "Yes" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the trade fee rate for takers on the perpetual market", + "Required": "Yes" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio for the perpetual market", + "Required": "Yes" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio for the perpetual market", + "Required": "Yes" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin (in human readable format)", + "Required": "Yes" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity (in human readable format)", + "Required": "Yes" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)", + "Required": "Yes" + }, + { + "Parameter": "reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "reduce_margin_ratio defines the ratio of the margin that is reduced", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgInstantSpotMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgInstantSpotMarketLaunch.json new file mode 100644 index 00000000..8e057560 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgInstantSpotMarketLaunch.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the spot market.", + "Required": "Yes" + }, + { + "Parameter": "base_denom", + "Type": "string", + "Description": "type of coin to use as the base currency", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the quote currency", + "Required": "Yes" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price (in human readable format)", + "Required": "Yes" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity (in human readable format)", + "Required": "Yes" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)", + "Required": "Yes" + }, + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "base token decimals", + "Required": "Yes" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgLiquidatePosition.json b/source/json_tables/injective/exchange/v2/MsgLiquidatePosition.json new file mode 100644 index 00000000..4aca8640 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgLiquidatePosition.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID the position belongs to", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the position's market ID", + "Required": "Yes" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "optional order to provide for liquidation", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgMarketForcedSettlement.json b/source/json_tables/injective/exchange/v2/MsgMarketForcedSettlement.json new file mode 100644 index 00000000..0e4f7e14 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgMarketForcedSettlement.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "MarketForcedSettlementProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgPerpetualMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgPerpetualMarketLaunch.json new file mode 100644 index 00000000..6c859240 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgPerpetualMarketLaunch.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "PerpetualMarketLaunchProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgPrivilegedExecuteContract.json b/source/json_tables/injective/exchange/v2/MsgPrivilegedExecuteContract.json new file mode 100644 index 00000000..320397ee --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgPrivilegedExecuteContract.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "funds", + "Type": "string", + "Description": "funds defines the user's bank coins used to fund the execution (e.g. 100inj).", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "contract_address defines the contract address to execute", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "string", + "Description": "data defines the call data used when executing the contract", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgPrivilegedExecuteContractResponse.json b/source/json_tables/injective/exchange/v2/MsgPrivilegedExecuteContractResponse.json new file mode 100644 index 00000000..65f26fd9 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgPrivilegedExecuteContractResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "funds_diff", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgReclaimLockedFunds.json b/source/json_tables/injective/exchange/v2/MsgReclaimLockedFunds.json new file mode 100644 index 00000000..c9429572 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgReclaimLockedFunds.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "lockedAccountPubKey", + "Type": "byte array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "signature", + "Type": "byte array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgRewardsOptOut.json b/source/json_tables/injective/exchange/v2/MsgRewardsOptOut.json new file mode 100644 index 00000000..3c271848 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgRewardsOptOut.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgSignData.json b/source/json_tables/injective/exchange/v2/MsgSignData.json new file mode 100644 index 00000000..54002345 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgSignData.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "Signer", + "Type": "github_com_cosmos_cosmos_sdk_types.AccAddress", + "Description": "Signer is the sdk.AccAddress of the message signer", + "Required": "Yes" + }, + { + "Parameter": "Data", + "Type": "byte array", + "Description": "Data represents the raw bytes of the content that is signed (text, json, etc)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgSignDoc.json b/source/json_tables/injective/exchange/v2/MsgSignDoc.json new file mode 100644 index 00000000..164c733a --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgSignDoc.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sign_type", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "value", + "Type": "MsgSignData", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgSpotMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgSpotMarketLaunch.json new file mode 100644 index 00000000..8792286b --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgSpotMarketLaunch.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "SpotMarketLaunchProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgSpotMarketParamUpdate.json b/source/json_tables/injective/exchange/v2/MsgSpotMarketParamUpdate.json new file mode 100644 index 00000000..38c88a0f --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgSpotMarketParamUpdate.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "SpotMarketParamUpdateProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgSubaccountTransfer.json b/source/json_tables/injective/exchange/v2/MsgSubaccountTransfer.json new file mode 100644 index 00000000..88d91ffa --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgSubaccountTransfer.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "source_subaccount_id", + "Type": "string", + "Description": "the source subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "destination_subaccount_id", + "Type": "string", + "Description": "the destination subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "the amount to transfer (in chain format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgTradingRewardCampaignLaunch.json b/source/json_tables/injective/exchange/v2/MsgTradingRewardCampaignLaunch.json new file mode 100644 index 00000000..f0366303 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgTradingRewardCampaignLaunch.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "TradingRewardCampaignLaunchProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgTradingRewardCampaignUpdate.json b/source/json_tables/injective/exchange/v2/MsgTradingRewardCampaignUpdate.json new file mode 100644 index 00000000..cf59aeac --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgTradingRewardCampaignUpdate.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "TradingRewardCampaignUpdateProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgTradingRewardPendingPointsUpdate.json b/source/json_tables/injective/exchange/v2/MsgTradingRewardPendingPointsUpdate.json new file mode 100644 index 00000000..1e7753e7 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgTradingRewardPendingPointsUpdate.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "message sender, that is also the TX signer", + "Required": "Yes" + }, + { + "Parameter": "proposal", + "Type": "TradingRewardPendingPointsUpdateProposal", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgUpdateDerivativeMarket.json b/source/json_tables/injective/exchange/v2/MsgUpdateDerivativeMarket.json new file mode 100644 index 00000000..cf4f6245 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgUpdateDerivativeMarket.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "admin", + "Type": "string", + "Description": "current admin address of the associated market", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "id of the market to be updated", + "Required": "Yes" + }, + { + "Parameter": "new_ticker", + "Type": "string", + "Description": "(optional) updated value for ticker", + "Required": "No" + }, + { + "Parameter": "new_min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value for min_price_tick_size (in human readable format)", + "Required": "No" + }, + { + "Parameter": "new_min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value min_quantity_tick_size (in human readable format)", + "Required": "No" + }, + { + "Parameter": "new_min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated min notional (in human readable format)", + "Required": "No" + }, + { + "Parameter": "new_initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value for initial_margin_ratio", + "Required": "No" + }, + { + "Parameter": "new_maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value for maintenance_margin_ratio", + "Required": "No" + }, + { + "Parameter": "new_reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated value for reduce_margin_ratio", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgUpdateParams.json b/source/json_tables/injective/exchange/v2/MsgUpdateParams.json new file mode 100644 index 00000000..4776bb94 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the exchange parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgUpdateSpotMarket.json b/source/json_tables/injective/exchange/v2/MsgUpdateSpotMarket.json new file mode 100644 index 00000000..950316f1 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgUpdateSpotMarket.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "admin", + "Type": "string", + "Description": "current admin address of the associated market", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "id of the market to be updated", + "Required": "Yes" + }, + { + "Parameter": "new_ticker", + "Type": "string", + "Description": "(optional) updated ticker value", + "Required": "No" + }, + { + "Parameter": "new_min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated min price tick size value (in human readable format)", + "Required": "No" + }, + { + "Parameter": "new_min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated min quantity tick size value (in human readable format)", + "Required": "No" + }, + { + "Parameter": "new_min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "(optional) updated min notional (in human readable format)", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgWithdraw.json b/source/json_tables/injective/exchange/v2/MsgWithdraw.json new file mode 100644 index 00000000..4d1bdc44 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgWithdraw.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID to withdraw funds from", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "the amount of the withdrawal (in chain format)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/NextFundingTimestamp.json b/source/json_tables/injective/exchange/v2/NextFundingTimestamp.json new file mode 100644 index 00000000..cc60cabd --- /dev/null +++ b/source/json_tables/injective/exchange/v2/NextFundingTimestamp.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "next_timestamp", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/OracleParams.json b/source/json_tables/injective/exchange/v2/OracleParams.json new file mode 100644 index 00000000..a719913c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/OracleParams.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + } +] diff --git a/source/json_tables/injective/exchange/v2/OrderData.json b/source/json_tables/injective/exchange/v2/OrderData.json new file mode 100644 index 00000000..b987f072 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/OrderData.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash (optional - either the order_hash or the cid should be provided)" + }, + { + "Parameter": "order_mask", + "Type": "int32", + "Description": "the order mask (bitwise combination of OrderMask enum values)" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional - either the order_hash or the cid should be provided)" + } +] diff --git a/source/json_tables/injective/exchange/v2/OrderInfo.json b/source/json_tables/injective/exchange/v2/OrderInfo.json new file mode 100644 index 00000000..87f29735 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/OrderInfo.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "bytes32 subaccount ID that created the order" + }, + { + "Parameter": "fee_recipient", + "Type": "string", + "Description": "address fee_recipient address that will receive fees for the order" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order (in human readable format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order (in human readable format)" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional)" + } +] diff --git a/source/json_tables/injective/exchange/v2/OrderMask.json b/source/json_tables/injective/exchange/v2/OrderMask.json new file mode 100644 index 00000000..cb8b26d1 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/OrderMask.json @@ -0,0 +1,34 @@ +[ + { + "Code": "0", + "Name": "UNUSED" + }, + { + "Code": "1", + "Name": "ANY" + }, + { + "Code": "2", + "Name": "REGULAR" + }, + { + "Code": "4", + "Name": "CONDITIONAL" + }, + { + "Code": "8", + "Name": "DIRECTION_BUY_OR_HIGHER" + }, + { + "Code": "16", + "Name": "DIRECTION_SELL_OR_LOWER" + }, + { + "Code": "32", + "Name": "TYPE_MARKET" + }, + { + "Code": "64", + "Name": "TYPE_LIMIT" + } +] diff --git a/source/json_tables/injective/exchange/v2/OrderSide.json b/source/json_tables/injective/exchange/v2/OrderSide.json new file mode 100644 index 00000000..3ea817f7 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/OrderSide.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "Side_Unspecified" + }, + { + "Code": "1", + "Name": "Buy" + }, + { + "Code": "2", + "Name": "Sell" + } +] diff --git a/source/json_tables/injective/exchange/v2/OrderType.json b/source/json_tables/injective/exchange/v2/OrderType.json new file mode 100644 index 00000000..d381637c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/OrderType.json @@ -0,0 +1,46 @@ +[ + { + "Code": "0", + "Name": "UNSPECIFIED" + }, + { + "Code": "1", + "Name": "BUY" + }, + { + "Code": "2", + "Name": "SELL" + }, + { + "Code": "3", + "Name": "STOP_BUY" + }, + { + "Code": "4", + "Name": "STOP_SELL" + }, + { + "Code": "5", + "Name": "TAKE_BUY" + }, + { + "Code": "6", + "Name": "TAKE_SELL" + }, + { + "Code": "7", + "Name": "BUY_PO" + }, + { + "Code": "8", + "Name": "SELL_PO" + }, + { + "Code": "9", + "Name": "BUY_ATOMIC" + }, + { + "Code": "10", + "Name": "SELL_ATOMIC" + } +] diff --git a/source/json_tables/injective/exchange/v2/Orderbook.json b/source/json_tables/injective/exchange/v2/Orderbook.json new file mode 100644 index 00000000..4fa22ef2 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/Orderbook.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "buy_levels", + "Type": "Level array", + "Description": "" + }, + { + "Parameter": "sell_levels", + "Type": "Level array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/OrderbookSequence.json b/source/json_tables/injective/exchange/v2/OrderbookSequence.json new file mode 100644 index 00000000..96a9c666 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/OrderbookSequence.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "sequence", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/OrderbookUpdate.json b/source/json_tables/injective/exchange/v2/OrderbookUpdate.json new file mode 100644 index 00000000..cf5118cf --- /dev/null +++ b/source/json_tables/injective/exchange/v2/OrderbookUpdate.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "seq", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "orderbook", + "Type": "Orderbook", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/Params.json b/source/json_tables/injective/exchange/v2/Params.json new file mode 100644 index 00000000..cfa3db7a --- /dev/null +++ b/source/json_tables/injective/exchange/v2/Params.json @@ -0,0 +1,157 @@ +[ + { + "Parameter": "spot_market_instant_listing_fee", + "Type": "types.Coin", + "Description": "spot_market_instant_listing_fee defines the expedited fee in INJ required to create a spot market by bypassing governance" + }, + { + "Parameter": "derivative_market_instant_listing_fee", + "Type": "types.Coin", + "Description": "derivative_market_instant_listing_fee defines the expedited fee in INJ required to create a derivative market by bypassing governance" + }, + { + "Parameter": "default_spot_maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_spot_maker_fee defines the default exchange trade fee for makers on a spot market" + }, + { + "Parameter": "default_spot_taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_spot_taker_fee_rate defines the default exchange trade fee rate for takers on a new spot market" + }, + { + "Parameter": "default_derivative_maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_derivative_maker_fee defines the default exchange trade fee for makers on a new derivative market" + }, + { + "Parameter": "default_derivative_taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_derivative_taker_fee defines the default exchange trade fee for takers on a new derivative market" + }, + { + "Parameter": "default_initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_initial_margin_ratio defines the default initial margin ratio on a new derivative market" + }, + { + "Parameter": "default_maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_maintenance_margin_ratio defines the default maintenance margin ratio on a new derivative market" + }, + { + "Parameter": "default_funding_interval", + "Type": "int64", + "Description": "default_funding_interval defines the default funding interval on a derivative market" + }, + { + "Parameter": "funding_multiple", + "Type": "int64", + "Description": "funding_multiple defines the timestamp multiple that the funding timestamp should be a multiple of" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the trade fee share percentage that goes to relayers" + }, + { + "Parameter": "default_hourly_funding_rate_cap", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_hourly_funding_rate_cap defines the default maximum absolute value of the hourly funding rate" + }, + { + "Parameter": "default_hourly_interest_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_interest_rate defines the hourly interest rate" + }, + { + "Parameter": "max_derivative_order_side_count", + "Type": "uint32", + "Description": "max_derivative_order_side_count defines the maximum number of derivative active orders a subaccount can have for a given orderbook side" + }, + { + "Parameter": "inj_reward_staked_requirement_threshold", + "Type": "cosmossdk_io_math.Int", + "Description": "inj_reward_staked_requirement_threshold defines the threshold on INJ rewards after which one also needs staked INJ to receive more" + }, + { + "Parameter": "trading_rewards_vesting_duration", + "Type": "int64", + "Description": "the trading_rewards_vesting_duration defines the vesting times for trading rewards" + }, + { + "Parameter": "liquidator_reward_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "liquidator_reward_share_rate defines the ratio of the split of the surplus collateral that goes to the liquidator" + }, + { + "Parameter": "binary_options_market_instant_listing_fee", + "Type": "types.Coin", + "Description": "binary_options_market_instant_listing_fee defines the expedited fee in INJ required to create a derivative market by bypassing governance" + }, + { + "Parameter": "atomic_market_order_access_level", + "Type": "AtomicMarketOrderAccessLevel", + "Description": "atomic_market_order_access_level defines the required access permissions for executing atomic market orders" + }, + { + "Parameter": "spot_atomic_market_order_fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "spot_atomic_market_order_fee_multiplier defines the default multiplier for executing atomic market orders in spot markets" + }, + { + "Parameter": "derivative_atomic_market_order_fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "derivative_atomic_market_order_fee_multiplier defines the default multiplier for executing atomic market orders in derivative markets" + }, + { + "Parameter": "binary_options_atomic_market_order_fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "binary_options_atomic_market_order_fee_multiplier defines the default multiplier for executing atomic market orders in binary markets" + }, + { + "Parameter": "minimal_protocol_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "minimal_protocol_fee_rate defines the minimal protocol fee rate" + }, + { + "Parameter": "is_instant_derivative_market_launch_enabled", + "Type": "bool", + "Description": "is_instant_derivative_market_launch_enabled defines whether instant derivative market launch is enabled" + }, + { + "Parameter": "post_only_mode_height_threshold", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "margin_decrease_price_timestamp_threshold_seconds", + "Type": "int64", + "Description": "Maximum time in seconds since the last mark price update to allow a decrease in margin" + }, + { + "Parameter": "exchange_admins", + "Type": "string array", + "Description": "List of addresses that are allowed to perform exchange admin operations" + }, + { + "Parameter": "inj_auction_max_cap", + "Type": "cosmossdk_io_math.Int", + "Description": "inj_auction_max_cap defines the maximum cap for INJ sent to auction" + }, + { + "Parameter": "fixed_gas_enabled", + "Type": "bool", + "Description": "fixed_gas_enabled indicates if msg server will consume fixed gas amount for certain msg types" + }, + { + "Parameter": "emit_legacy_version_events", + "Type": "bool", + "Description": "emit_legacy_version_events indicates if events of legacy version types should be emitted in parallel to the new version events" + }, + { + "Parameter": "default_reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "default_reduce_margin_ratio defines the default reduce margin ratio on a new derivative market" + } +] diff --git a/source/json_tables/injective/exchange/v2/PerpetualMarketFunding.json b/source/json_tables/injective/exchange/v2/PerpetualMarketFunding.json new file mode 100644 index 00000000..75ae0aad --- /dev/null +++ b/source/json_tables/injective/exchange/v2/PerpetualMarketFunding.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "cumulative_funding", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "cumulative_funding defines the cumulative funding of a perpetual market." + }, + { + "Parameter": "cumulative_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "cumulative_price defines the cumulative price for the current hour up to the last timestamp (in human readable format)" + }, + { + "Parameter": "last_timestamp", + "Type": "int64", + "Description": "the last funding timestamp in seconds" + } +] diff --git a/source/json_tables/injective/exchange/v2/PerpetualMarketFundingState.json b/source/json_tables/injective/exchange/v2/PerpetualMarketFundingState.json new file mode 100644 index 00000000..f063b60e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/PerpetualMarketFundingState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "funding", + "Type": "PerpetualMarketFunding", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/PerpetualMarketInfo.json b/source/json_tables/injective/exchange/v2/PerpetualMarketInfo.json new file mode 100644 index 00000000..26cd6e6e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/PerpetualMarketInfo.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market ID." + }, + { + "Parameter": "hourly_funding_rate_cap", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_funding_rate_cap defines the maximum absolute value of the hourly funding rate" + }, + { + "Parameter": "hourly_interest_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "hourly_interest_rate defines the hourly interest rate" + }, + { + "Parameter": "next_funding_timestamp", + "Type": "int64", + "Description": "next_funding_timestamp defines the next funding timestamp in seconds of a perpetual market" + }, + { + "Parameter": "funding_interval", + "Type": "int64", + "Description": "funding_interval defines the next funding interval in seconds of a perpetual market." + } +] diff --git a/source/json_tables/injective/exchange/v2/PerpetualMarketLaunchProposal.json b/source/json_tables/injective/exchange/v2/PerpetualMarketLaunchProposal.json new file mode 100644 index 00000000..acae45a8 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/PerpetualMarketLaunchProposal.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative market." + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the base currency" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + }, + { + "Parameter": "initial_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "initial_margin_ratio defines the initial margin ratio for the derivative market" + }, + { + "Parameter": "maintenance_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maintenance_margin_ratio defines the maintenance margin ratio for the derivative market" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the exchange trade fee for makers for the derivative market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the exchange trade fee for takers for the derivative market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + }, + { + "Parameter": "reduce_margin_ratio", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "reduce_margin_ratio defines the ratio of the margin that is reduced" + } +] diff --git a/source/json_tables/injective/exchange/v2/PerpetualMarketState.json b/source/json_tables/injective/exchange/v2/PerpetualMarketState.json new file mode 100644 index 00000000..4dda8645 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/PerpetualMarketState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_info", + "Type": "PerpetualMarketInfo", + "Description": "" + }, + { + "Parameter": "funding_info", + "Type": "PerpetualMarketFunding", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/PointsMultiplier.json b/source/json_tables/injective/exchange/v2/PointsMultiplier.json new file mode 100644 index 00000000..dc9bfc18 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/PointsMultiplier.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "maker_points_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "taker_points_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/Position.json b/source/json_tables/injective/exchange/v2/Position.json new file mode 100644 index 00000000..c8a42339 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/Position.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "isLong", + "Type": "bool", + "Description": "True if the position is long. False if the position is short." + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The quantity of the position (in human readable format)" + }, + { + "Parameter": "entry_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The entry price of the position (in human readable format)" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The margin of the position (in human readable format)" + }, + { + "Parameter": "cumulative_funding_entry", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The cumulative funding" + } +] diff --git a/source/json_tables/injective/exchange/v2/PositionDelta.json b/source/json_tables/injective/exchange/v2/PositionDelta.json new file mode 100644 index 00000000..6b03dc30 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/PositionDelta.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "is_long", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "execution_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "execution_margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "execution_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/PriceLevel.json b/source/json_tables/injective/exchange/v2/PriceLevel.json new file mode 100644 index 00000000..801e8051 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/PriceLevel.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity" + } +] diff --git a/source/json_tables/injective/exchange/v2/ProviderOracleParams.json b/source/json_tables/injective/exchange/v2/ProviderOracleParams.json new file mode 100644 index 00000000..bfac78ac --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ProviderOracleParams.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "Oracle base currency" + }, + { + "Parameter": "provider", + "Type": "string", + "Description": "Oracle quote currency" + }, + { + "Parameter": "oracle_scale_factor", + "Type": "uint32", + "Description": "Scale factor for oracle prices." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAccountAddressDerivativeOrdersRequest.json b/source/json_tables/injective/exchange/v2/QueryAccountAddressDerivativeOrdersRequest.json new file mode 100644 index 00000000..0dee911b --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAccountAddressDerivativeOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address of the trader", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAccountAddressDerivativeOrdersResponse.json b/source/json_tables/injective/exchange/v2/QueryAccountAddressDerivativeOrdersResponse.json new file mode 100644 index 00000000..ef320bcb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAccountAddressDerivativeOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedDerivativeLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAccountAddressSpotOrdersRequest.json b/source/json_tables/injective/exchange/v2/QueryAccountAddressSpotOrdersRequest.json new file mode 100644 index 00000000..0dee911b --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAccountAddressSpotOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address of the trader", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAccountAddressSpotOrdersResponse.json b/source/json_tables/injective/exchange/v2/QueryAccountAddressSpotOrdersResponse.json new file mode 100644 index 00000000..37b944cd --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAccountAddressSpotOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedSpotLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryActiveStakeGrantRequest.json b/source/json_tables/injective/exchange/v2/QueryActiveStakeGrantRequest.json new file mode 100644 index 00000000..e4d70b5b --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryActiveStakeGrantRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "grantee", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryActiveStakeGrantResponse.json b/source/json_tables/injective/exchange/v2/QueryActiveStakeGrantResponse.json new file mode 100644 index 00000000..6e463b5e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryActiveStakeGrantResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "grant", + "Type": "ActiveGrant", + "Description": "" + }, + { + "Parameter": "effective_grant", + "Type": "EffectiveGrant", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumeRequest.json b/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumeRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumeResponse.json b/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumeResponse.json new file mode 100644 index 00000000..edd45193 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "volume", + "Type": "VolumeRecord", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumesRequest.json b/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumesRequest.json new file mode 100644 index 00000000..d27c139f --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumesRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumesResponse.json b/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumesResponse.json new file mode 100644 index 00000000..d298b03d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAggregateMarketVolumesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "volumes", + "Type": "MarketVolume array", + "Description": "the aggregate volumes for the entire market" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAggregateVolumeRequest.json b/source/json_tables/injective/exchange/v2/QueryAggregateVolumeRequest.json new file mode 100644 index 00000000..9266a1f4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAggregateVolumeRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "can either be an address or a subaccount", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAggregateVolumeResponse.json b/source/json_tables/injective/exchange/v2/QueryAggregateVolumeResponse.json new file mode 100644 index 00000000..ae6e7779 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAggregateVolumeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "aggregate_volumes", + "Type": "MarketVolume array", + "Description": "if an address is specified, then the aggregate_volumes will aggregate the volumes across all subaccounts for the address" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAggregateVolumesRequest.json b/source/json_tables/injective/exchange/v2/QueryAggregateVolumesRequest.json new file mode 100644 index 00000000..0b35ce27 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAggregateVolumesRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "accounts", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryAggregateVolumesResponse.json b/source/json_tables/injective/exchange/v2/QueryAggregateVolumesResponse.json new file mode 100644 index 00000000..09784e6c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryAggregateVolumesResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "aggregate_account_volumes", + "Type": "AggregateAccountVolumeRecord array", + "Description": "the aggregate volume records for the accounts specified" + }, + { + "Parameter": "aggregate_market_volumes", + "Type": "MarketVolume array", + "Description": "the aggregate volumes for the markets specified" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryBalanceMismatchesRequest.json b/source/json_tables/injective/exchange/v2/QueryBalanceMismatchesRequest.json new file mode 100644 index 00000000..903a2986 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryBalanceMismatchesRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "dust_factor", + "Type": "int64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryBalanceMismatchesResponse.json b/source/json_tables/injective/exchange/v2/QueryBalanceMismatchesResponse.json new file mode 100644 index 00000000..dcf6c578 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryBalanceMismatchesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance_mismatches", + "Type": "BalanceMismatch array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryBalanceWithBalanceHoldsResponse.json b/source/json_tables/injective/exchange/v2/QueryBalanceWithBalanceHoldsResponse.json new file mode 100644 index 00000000..d9a463b7 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryBalanceWithBalanceHoldsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance_with_balance_holds", + "Type": "BalanceWithMarginHold array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryBinaryMarketsRequest.json b/source/json_tables/injective/exchange/v2/QueryBinaryMarketsRequest.json new file mode 100644 index 00000000..cb30b1e5 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryBinaryMarketsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the market, for convenience it is set to string - not enum", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryBinaryMarketsResponse.json b/source/json_tables/injective/exchange/v2/QueryBinaryMarketsResponse.json new file mode 100644 index 00000000..6ca794b0 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryBinaryMarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "BinaryOptionsMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDenomDecimalRequest.json b/source/json_tables/injective/exchange/v2/QueryDenomDecimalRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDenomDecimalRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDenomDecimalResponse.json b/source/json_tables/injective/exchange/v2/QueryDenomDecimalResponse.json new file mode 100644 index 00000000..adffa0ac --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDenomDecimalResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "decimal", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDenomDecimalsRequest.json b/source/json_tables/injective/exchange/v2/QueryDenomDecimalsRequest.json new file mode 100644 index 00000000..691ba356 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDenomDecimalsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denoms", + "Type": "string array", + "Description": "denoms can be empty to query all denom decimals", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDenomDecimalsResponse.json b/source/json_tables/injective/exchange/v2/QueryDenomDecimalsResponse.json new file mode 100644 index 00000000..9fced98e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDenomDecimalsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "denom_decimals", + "Type": "DenomDecimals array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalRequest.json b/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalResponse.json b/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalResponse.json new file mode 100644 index 00000000..247bfb04 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the minimum notional amount for the denom (in human readable format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalsResponse.json b/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalsResponse.json new file mode 100644 index 00000000..b56ff46c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDenomMinNotionalsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "denom_min_notionals", + "Type": "DenomMinNotional array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeMarketAddressRequest.json b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketAddressRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketAddressRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeMarketAddressResponse.json b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketAddressResponse.json new file mode 100644 index 00000000..b3f4b483 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketAddressResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "address for the market" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "subaccountID for the market" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeMarketRequest.json b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeMarketResponse.json b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketResponse.json new file mode 100644 index 00000000..7b265398 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "FullDerivativeMarket", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeMarketsRequest.json b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketsRequest.json new file mode 100644 index 00000000..60afd827 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketsRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the market, for convenience it is set to string - not enum", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "Filter by market IDs", + "Required": "Yes" + }, + { + "Parameter": "with_mid_price_and_tob", + "Type": "bool", + "Description": "Flag to return the markets mid price and top of the book buy and sell orders.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeMarketsResponse.json b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketsResponse.json new file mode 100644 index 00000000..04655922 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeMarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "FullDerivativeMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeMidPriceAndTOBRequest.json b/source/json_tables/injective/exchange/v2/QueryDerivativeMidPriceAndTOBRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeMidPriceAndTOBRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeMidPriceAndTOBResponse.json b/source/json_tables/injective/exchange/v2/QueryDerivativeMidPriceAndTOBResponse.json new file mode 100644 index 00000000..eb70dcc6 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeMidPriceAndTOBResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "mid_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "mid price of the market" + }, + { + "Parameter": "best_buy_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best buy price of the market" + }, + { + "Parameter": "best_sell_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best sell price of the market" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeOrderbookRequest.json b/source/json_tables/injective/exchange/v2/QueryDerivativeOrderbookRequest.json new file mode 100644 index 00000000..8f8d6192 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeOrderbookRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "limit_cumulative_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeOrderbookResponse.json b/source/json_tables/injective/exchange/v2/QueryDerivativeOrderbookResponse.json new file mode 100644 index 00000000..74f73ed8 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeOrderbookResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "buys_price_level", + "Type": "Level array", + "Description": "" + }, + { + "Parameter": "sells_price_level", + "Type": "Level array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeOrdersByHashesRequest.json b/source/json_tables/injective/exchange/v2/QueryDerivativeOrdersByHashesRequest.json new file mode 100644 index 00000000..2c1f7287 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeOrdersByHashesRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + }, + { + "Parameter": "order_hashes", + "Type": "string array", + "Description": "the order hashes", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryDerivativeOrdersByHashesResponse.json b/source/json_tables/injective/exchange/v2/QueryDerivativeOrdersByHashesResponse.json new file mode 100644 index 00000000..ef320bcb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryDerivativeOrdersByHashesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedDerivativeLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryExchangeBalancesResponse.json b/source/json_tables/injective/exchange/v2/QueryExchangeBalancesResponse.json new file mode 100644 index 00000000..e5b39b59 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryExchangeBalancesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balances", + "Type": "Balance array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryExchangeParamsResponse.json b/source/json_tables/injective/exchange/v2/QueryExchangeParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryExchangeParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryExpiryFuturesMarketInfoRequest.json b/source/json_tables/injective/exchange/v2/QueryExpiryFuturesMarketInfoRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryExpiryFuturesMarketInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryExpiryFuturesMarketInfoResponse.json b/source/json_tables/injective/exchange/v2/QueryExpiryFuturesMarketInfoResponse.json new file mode 100644 index 00000000..5ba19021 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryExpiryFuturesMarketInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "info", + "Type": "ExpiryFuturesMarketInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFeeDiscountAccountInfoRequest.json b/source/json_tables/injective/exchange/v2/QueryFeeDiscountAccountInfoRequest.json new file mode 100644 index 00000000..5cca90ec --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFeeDiscountAccountInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFeeDiscountAccountInfoResponse.json b/source/json_tables/injective/exchange/v2/QueryFeeDiscountAccountInfoResponse.json new file mode 100644 index 00000000..334c284d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFeeDiscountAccountInfoResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "tier_level", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "account_info", + "Type": "FeeDiscountTierInfo", + "Description": "" + }, + { + "Parameter": "account_ttl", + "Type": "FeeDiscountTierTTL", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFeeDiscountScheduleResponse.json b/source/json_tables/injective/exchange/v2/QueryFeeDiscountScheduleResponse.json new file mode 100644 index 00000000..d44af734 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFeeDiscountScheduleResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "fee_discount_schedule", + "Type": "FeeDiscountSchedule", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFeeDiscountTierStatisticsResponse.json b/source/json_tables/injective/exchange/v2/QueryFeeDiscountTierStatisticsResponse.json new file mode 100644 index 00000000..4265f017 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFeeDiscountTierStatisticsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "statistics", + "Type": "TierStatistic array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFullDerivativeOrderbookRequest.json b/source/json_tables/injective/exchange/v2/QueryFullDerivativeOrderbookRequest.json new file mode 100644 index 00000000..409e8e83 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFullDerivativeOrderbookRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market id", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFullDerivativeOrderbookResponse.json b/source/json_tables/injective/exchange/v2/QueryFullDerivativeOrderbookResponse.json new file mode 100644 index 00000000..d658e038 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFullDerivativeOrderbookResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "Bids", + "Type": "TrimmedLimitOrder array", + "Description": "" + }, + { + "Parameter": "Asks", + "Type": "TrimmedLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFullSpotMarketRequest.json b/source/json_tables/injective/exchange/v2/QueryFullSpotMarketRequest.json new file mode 100644 index 00000000..84d52e70 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFullSpotMarketRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "with_mid_price_and_tob", + "Type": "bool", + "Description": "Flag to return the markets mid price and top of the book buy and sell orders.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFullSpotMarketResponse.json b/source/json_tables/injective/exchange/v2/QueryFullSpotMarketResponse.json new file mode 100644 index 00000000..1ab90c27 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFullSpotMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "FullSpotMarket", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFullSpotMarketsRequest.json b/source/json_tables/injective/exchange/v2/QueryFullSpotMarketsRequest.json new file mode 100644 index 00000000..60afd827 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFullSpotMarketsRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the market, for convenience it is set to string - not enum", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "Filter by market IDs", + "Required": "Yes" + }, + { + "Parameter": "with_mid_price_and_tob", + "Type": "bool", + "Description": "Flag to return the markets mid price and top of the book buy and sell orders.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFullSpotMarketsResponse.json b/source/json_tables/injective/exchange/v2/QueryFullSpotMarketsResponse.json new file mode 100644 index 00000000..5fca8967 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFullSpotMarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "FullSpotMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFullSpotOrderbookRequest.json b/source/json_tables/injective/exchange/v2/QueryFullSpotOrderbookRequest.json new file mode 100644 index 00000000..409e8e83 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFullSpotOrderbookRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market id", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryFullSpotOrderbookResponse.json b/source/json_tables/injective/exchange/v2/QueryFullSpotOrderbookResponse.json new file mode 100644 index 00000000..d658e038 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryFullSpotOrderbookResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "Bids", + "Type": "TrimmedLimitOrder array", + "Description": "" + }, + { + "Parameter": "Asks", + "Type": "TrimmedLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationRequest.json b/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationRequest.json new file mode 100644 index 00000000..f788df59 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "grantee", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationResponse.json b/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationResponse.json new file mode 100644 index 00000000..78431df1 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationsRequest.json b/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationsRequest.json new file mode 100644 index 00000000..452375a3 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "granter", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationsResponse.json b/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationsResponse.json new file mode 100644 index 00000000..2141ecb4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryGrantAuthorizationsResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "total_grant_amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "grants", + "Type": "GrantAuthorization array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryHistoricalTradeRecordsRequest.json b/source/json_tables/injective/exchange/v2/QueryHistoricalTradeRecordsRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryHistoricalTradeRecordsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryHistoricalTradeRecordsResponse.json b/source/json_tables/injective/exchange/v2/QueryHistoricalTradeRecordsResponse.json new file mode 100644 index 00000000..626aec96 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryHistoricalTradeRecordsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "trade_records", + "Type": "TradeRecords array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryIsOptedOutOfRewardsRequest.json b/source/json_tables/injective/exchange/v2/QueryIsOptedOutOfRewardsRequest.json new file mode 100644 index 00000000..5cca90ec --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryIsOptedOutOfRewardsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryIsOptedOutOfRewardsResponse.json b/source/json_tables/injective/exchange/v2/QueryIsOptedOutOfRewardsResponse.json new file mode 100644 index 00000000..19377f9f --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryIsOptedOutOfRewardsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "is_opted_out", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketAtomicExecutionFeeMultiplierRequest.json b/source/json_tables/injective/exchange/v2/QueryMarketAtomicExecutionFeeMultiplierRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketAtomicExecutionFeeMultiplierRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketAtomicExecutionFeeMultiplierResponse.json b/source/json_tables/injective/exchange/v2/QueryMarketAtomicExecutionFeeMultiplierResponse.json new file mode 100644 index 00000000..bcf8ade7 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketAtomicExecutionFeeMultiplierResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketBalanceRequest.json b/source/json_tables/injective/exchange/v2/QueryMarketBalanceRequest.json new file mode 100644 index 00000000..409e8e83 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketBalanceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market id", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketBalanceResponse.json b/source/json_tables/injective/exchange/v2/QueryMarketBalanceResponse.json new file mode 100644 index 00000000..d341d232 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketBalanceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balance", + "Type": "MarketBalance", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketBalancesResponse.json b/source/json_tables/injective/exchange/v2/QueryMarketBalancesResponse.json new file mode 100644 index 00000000..fac43ddf --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketBalancesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "balances", + "Type": "MarketBalance array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketIDFromVaultRequest.json b/source/json_tables/injective/exchange/v2/QueryMarketIDFromVaultRequest.json new file mode 100644 index 00000000..77e78b52 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketIDFromVaultRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "vault_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketIDFromVaultResponse.json b/source/json_tables/injective/exchange/v2/QueryMarketIDFromVaultResponse.json new file mode 100644 index 00000000..383d1f91 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketIDFromVaultResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketVolatilityRequest.json b/source/json_tables/injective/exchange/v2/QueryMarketVolatilityRequest.json new file mode 100644 index 00000000..f279bfbc --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketVolatilityRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID to query volatility for", + "Required": "Yes" + }, + { + "Parameter": "trade_history_options", + "Type": "TradeHistoryOptions", + "Description": "the trade history options", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryMarketVolatilityResponse.json b/source/json_tables/injective/exchange/v2/QueryMarketVolatilityResponse.json new file mode 100644 index 00000000..cb9911e7 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryMarketVolatilityResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "volatility", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "history_metadata", + "Type": "types.MetadataStatistics", + "Description": "" + }, + { + "Parameter": "raw_history", + "Type": "TradeRecord array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryModuleStateResponse.json b/source/json_tables/injective/exchange/v2/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryOptedOutOfRewardsAccountsResponse.json b/source/json_tables/injective/exchange/v2/QueryOptedOutOfRewardsAccountsResponse.json new file mode 100644 index 00000000..f2a19fc9 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryOptedOutOfRewardsAccountsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "accounts", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryPerpetualMarketFundingRequest.json b/source/json_tables/injective/exchange/v2/QueryPerpetualMarketFundingRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryPerpetualMarketFundingRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryPerpetualMarketFundingResponse.json b/source/json_tables/injective/exchange/v2/QueryPerpetualMarketFundingResponse.json new file mode 100644 index 00000000..ed808a6e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryPerpetualMarketFundingResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "PerpetualMarketFunding", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryPerpetualMarketInfoRequest.json b/source/json_tables/injective/exchange/v2/QueryPerpetualMarketInfoRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryPerpetualMarketInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryPerpetualMarketInfoResponse.json b/source/json_tables/injective/exchange/v2/QueryPerpetualMarketInfoResponse.json new file mode 100644 index 00000000..f1abec61 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryPerpetualMarketInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "info", + "Type": "PerpetualMarketInfo", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryPositionsInMarketRequest.json b/source/json_tables/injective/exchange/v2/QueryPositionsInMarketRequest.json new file mode 100644 index 00000000..e2465242 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryPositionsInMarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryPositionsInMarketResponse.json b/source/json_tables/injective/exchange/v2/QueryPositionsInMarketResponse.json new file mode 100644 index 00000000..85b2ef42 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryPositionsInMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "DerivativePosition array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryPositionsResponse.json b/source/json_tables/injective/exchange/v2/QueryPositionsResponse.json new file mode 100644 index 00000000..85b2ef42 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryPositionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "DerivativePosition array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotMarketRequest.json b/source/json_tables/injective/exchange/v2/QuerySpotMarketRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotMarketRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotMarketResponse.json b/source/json_tables/injective/exchange/v2/QuerySpotMarketResponse.json new file mode 100644 index 00000000..b5c7e2a4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market", + "Type": "SpotMarket", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotMarketsRequest.json b/source/json_tables/injective/exchange/v2/QuerySpotMarketsRequest.json new file mode 100644 index 00000000..5108e2ae --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotMarketsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "status", + "Type": "string", + "Description": "Status of the market, for convenience it is set to string - not enum", + "Required": "Yes" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "Filter by market IDs", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotMarketsResponse.json b/source/json_tables/injective/exchange/v2/QuerySpotMarketsResponse.json new file mode 100644 index 00000000..ddfbdb21 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotMarketsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "markets", + "Type": "SpotMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotMidPriceAndTOBRequest.json b/source/json_tables/injective/exchange/v2/QuerySpotMidPriceAndTOBRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotMidPriceAndTOBRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotMidPriceAndTOBResponse.json b/source/json_tables/injective/exchange/v2/QuerySpotMidPriceAndTOBResponse.json new file mode 100644 index 00000000..3339d6f3 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotMidPriceAndTOBResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "mid_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "mid price of the market (in human readable format)" + }, + { + "Parameter": "best_buy_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best buy price of the market (in human readable format)" + }, + { + "Parameter": "best_sell_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "best sell price of the market" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotOrderbookRequest.json b/source/json_tables/injective/exchange/v2/QuerySpotOrderbookRequest.json new file mode 100644 index 00000000..602f8eb1 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotOrderbookRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "limit", + "Type": "uint64", + "Description": "the maximum number of orderbook entries to return per side (optional)", + "Required": "No" + }, + { + "Parameter": "order_side", + "Type": "OrderSide", + "Description": "the order side to return the orderbook entries for (optional)", + "Required": "No" + }, + { + "Parameter": "limit_cumulative_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "limits the number of entries to return per side based on the cumulative notional (in human readable format)", + "Required": "No" + }, + { + "Parameter": "limit_cumulative_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "limits the number of entries to return per side based on the cumulative quantity (in human readable format)", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotOrderbookResponse.json b/source/json_tables/injective/exchange/v2/QuerySpotOrderbookResponse.json new file mode 100644 index 00000000..74f73ed8 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotOrderbookResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "buys_price_level", + "Type": "Level array", + "Description": "" + }, + { + "Parameter": "sells_price_level", + "Type": "Level array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotOrdersByHashesRequest.json b/source/json_tables/injective/exchange/v2/QuerySpotOrdersByHashesRequest.json new file mode 100644 index 00000000..2c1f7287 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotOrdersByHashesRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + }, + { + "Parameter": "order_hashes", + "Type": "string array", + "Description": "the order hashes", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySpotOrdersByHashesResponse.json b/source/json_tables/injective/exchange/v2/QuerySpotOrdersByHashesResponse.json new file mode 100644 index 00000000..37b944cd --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySpotOrdersByHashesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedSpotLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountDepositRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountDepositRequest.json new file mode 100644 index 00000000..c8859310 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountDepositRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "the token denom", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountDepositResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountDepositResponse.json new file mode 100644 index 00000000..0cc1c269 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountDepositResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "deposits", + "Type": "Deposit", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountDepositsRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountDepositsRequest.json new file mode 100644 index 00000000..0c93757f --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountDepositsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "subaccount", + "Type": "Subaccount", + "Description": "the subaccount details", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountDepositsResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountDepositsResponse.json new file mode 100644 index 00000000..96bc2e6c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountDepositsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "deposits", + "Type": "map[string]Deposit", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketRequest.json new file mode 100644 index 00000000..6968bc24 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketResponse.json new file mode 100644 index 00000000..1efde0db --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "EffectivePosition", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountOrderMetadataRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountOrderMetadataRequest.json new file mode 100644 index 00000000..d26bb9a4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountOrderMetadataRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountOrderMetadataResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountOrderMetadataResponse.json new file mode 100644 index 00000000..037b2dd4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountOrderMetadataResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "metadata", + "Type": "SubaccountOrderbookMetadataWithMarket array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountOrdersRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountOrdersRequest.json new file mode 100644 index 00000000..6968bc24 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountOrdersResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountOrdersResponse.json new file mode 100644 index 00000000..0c8eed53 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountOrdersResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "buy_orders", + "Type": "SubaccountOrderData array", + "Description": "" + }, + { + "Parameter": "sell_orders", + "Type": "SubaccountOrderData array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketRequest.json new file mode 100644 index 00000000..6968bc24 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketResponse.json new file mode 100644 index 00000000..093e6566 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "Position", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountPositionsRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionsRequest.json new file mode 100644 index 00000000..d26bb9a4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountPositionsResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionsResponse.json new file mode 100644 index 00000000..85b2ef42 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "DerivativePosition array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountTradeNonceRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountTradeNonceRequest.json new file mode 100644 index 00000000..d26bb9a4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountTradeNonceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountTradeNonceResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountTradeNonceResponse.json new file mode 100644 index 00000000..a85c3523 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountTradeNonceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "nonce", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTradeRewardCampaignResponse.json b/source/json_tables/injective/exchange/v2/QueryTradeRewardCampaignResponse.json new file mode 100644 index 00000000..9d2051cb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTradeRewardCampaignResponse.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "trading_reward_campaign_info", + "Type": "TradingRewardCampaignInfo", + "Description": "" + }, + { + "Parameter": "trading_reward_pool_campaign_schedule", + "Type": "CampaignRewardPool array", + "Description": "" + }, + { + "Parameter": "total_trade_reward_points", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "pending_trading_reward_pool_campaign_schedule", + "Type": "CampaignRewardPool array", + "Description": "" + }, + { + "Parameter": "pending_total_trade_reward_points", + "Type": "cosmossdk_io_math.LegacyDec array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTradeRewardPointsRequest.json b/source/json_tables/injective/exchange/v2/QueryTradeRewardPointsRequest.json new file mode 100644 index 00000000..3616b9ca --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTradeRewardPointsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "accounts", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "pending_pool_timestamp", + "Type": "int64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTradeRewardPointsResponse.json b/source/json_tables/injective/exchange/v2/QueryTradeRewardPointsResponse.json new file mode 100644 index 00000000..f2929226 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTradeRewardPointsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "account_trade_reward_points", + "Type": "cosmossdk_io_math.LegacyDec array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTraderDerivativeConditionalOrdersRequest.json b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeConditionalOrdersRequest.json new file mode 100644 index 00000000..6968bc24 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeConditionalOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTraderDerivativeConditionalOrdersResponse.json b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeConditionalOrdersResponse.json new file mode 100644 index 00000000..8c9253b6 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeConditionalOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedDerivativeConditionalOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersRequest.json b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersRequest.json new file mode 100644 index 00000000..2dba47a4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersResponse.json b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersResponse.json new file mode 100644 index 00000000..ef320bcb --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedDerivativeLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersToCancelUpToAmountRequest.json b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersToCancelUpToAmountRequest.json new file mode 100644 index 00000000..e95679b3 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTraderDerivativeOrdersToCancelUpToAmountRequest.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + }, + { + "Parameter": "quote_amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quote amount to cancel (free up)", + "Required": "Yes" + }, + { + "Parameter": "strategy", + "Type": "CancellationStrategy", + "Description": "The cancellation strategy", + "Required": "Yes" + }, + { + "Parameter": "reference_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The reference price for the cancellation strategy, e.g. mid price or mark price", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersRequest.json b/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersRequest.json new file mode 100644 index 00000000..2dba47a4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersResponse.json b/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersResponse.json new file mode 100644 index 00000000..37b944cd --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orders", + "Type": "TrimmedSpotLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersToCancelUpToAmountRequest.json b/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersToCancelUpToAmountRequest.json new file mode 100644 index 00000000..889acbba --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryTraderSpotOrdersToCancelUpToAmountRequest.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "SubaccountID of the trader", + "Required": "Yes" + }, + { + "Parameter": "base_amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the base amount to cancel (free up)", + "Required": "Yes" + }, + { + "Parameter": "quote_amount", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quote amount to cancel (free up)", + "Required": "Yes" + }, + { + "Parameter": "strategy", + "Type": "CancellationStrategy", + "Description": "The cancellation strategy", + "Required": "Yes" + }, + { + "Parameter": "reference_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The reference price for the cancellation strategy, e.g. mid price or mark price", + "Required": "No" + } +] diff --git a/source/json_tables/injective/exchange/v2/RewardPointUpdate.json b/source/json_tables/injective/exchange/v2/RewardPointUpdate.json new file mode 100644 index 00000000..767289e4 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/RewardPointUpdate.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "new_points", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "new_points overwrites the current trading reward points for the account" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotLimitOrder.json b/source/json_tables/injective/exchange/v2/SpotLimitOrder.json new file mode 100644 index 00000000..576786f6 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotLimitOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "fillable", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "order hash" + }, + { + "Parameter": "expiration_block", + "Type": "int64", + "Description": "expiration block is the block number at which the order will expire" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotMarket.json b/source/json_tables/injective/exchange/v2/SpotMarket.json new file mode 100644 index 00000000..5a86d694 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotMarket.json @@ -0,0 +1,77 @@ +[ + { + "Parameter": "ticker", + "Type": "string", + "Description": "A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote asset." + }, + { + "Parameter": "base_denom", + "Type": "string", + "Description": "Coin denom used for the base asset" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Coin used for the quote asset" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the fee percentage makers pay when trading" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the fee percentage takers pay when trading" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the percentage of the transaction fee shared with the relayer in a derivative market" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "Unique market ID." + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "Status of the market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size that the price required for orders in the market (in human readable format)" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the quantity required for orders in the market (in human readable format)" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)" + }, + { + "Parameter": "admin", + "Type": "string", + "Description": "current market admin" + }, + { + "Parameter": "admin_permissions", + "Type": "uint32", + "Description": "level of admin permissions" + }, + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "base token decimals" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotMarketLaunchProposal.json b/source/json_tables/injective/exchange/v2/SpotMarketLaunchProposal.json new file mode 100644 index 00000000..bd898d1c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotMarketLaunchProposal.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the spot market." + }, + { + "Parameter": "base_denom", + "Type": "string", + "Description": "type of coin to use as the base currency" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "type of coin to use as the quote currency" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the fee percentage makers pay when trading" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the fee percentage takers pay when trading" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + }, + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "base token decimals" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotMarketOrder.json b/source/json_tables/injective/exchange/v2/SpotMarketOrder.json new file mode 100644 index 00000000..81f1b726 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotMarketOrder.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "balance_hold", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotMarketOrderResults.json b/source/json_tables/injective/exchange/v2/SpotMarketOrderResults.json new file mode 100644 index 00000000..808ec5f9 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotMarketOrderResults.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotMarketParamUpdateProposal.json b/source/json_tables/injective/exchange/v2/SpotMarketParamUpdateProposal.json new file mode 100644 index 00000000..df7d58b3 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotMarketParamUpdateProposal.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "maker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "maker_fee_rate defines the trade fee rate for makers on the spot market" + }, + { + "Parameter": "taker_fee_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "taker_fee_rate defines the trade fee rate for takers on the spot market" + }, + { + "Parameter": "relayer_fee_share_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "relayer_fee_share_rate defines the relayer fee share rate for the spot market" + }, + { + "Parameter": "min_price_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_price_tick_size defines the minimum tick size of the order's price and margin" + }, + { + "Parameter": "min_quantity_tick_size", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_quantity_tick_size defines the minimum tick size of the order's quantity" + }, + { + "Parameter": "status", + "Type": "MarketStatus", + "Description": "" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "" + }, + { + "Parameter": "min_notional", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "min_notional defines the minimum notional (in quote asset) required for orders in the market" + }, + { + "Parameter": "admin_info", + "Type": "AdminInfo", + "Description": "" + }, + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "base token decimals" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "quote token decimals" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotOrder.json b/source/json_tables/injective/exchange/v2/SpotOrder.json new file mode 100644 index 00000000..21594567 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotOrder.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "market_id represents the unique ID of the market" + }, + { + "Parameter": "order_info", + "Type": "OrderInfo", + "Description": "order_info contains the information of the order" + }, + { + "Parameter": "order_type", + "Type": "OrderType", + "Description": "order types" + }, + { + "Parameter": "trigger_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders (in human readable format) (optional)" + }, + { + "Parameter": "expiration_block", + "Type": "int64", + "Description": "expiration block is the block number at which the order will expire" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotOrderBook.json b/source/json_tables/injective/exchange/v2/SpotOrderBook.json new file mode 100644 index 00000000..e7ca0e24 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotOrderBook.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "isBuySide", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "orders", + "Type": "SpotLimitOrder array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/SpotOrderV2Changes.json b/source/json_tables/injective/exchange/v2/SpotOrderV2Changes.json new file mode 100644 index 00000000..5751e549 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SpotOrderV2Changes.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "cid", + "Type": "string", + "Description": "" + }, + { + "Parameter": "hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "p", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order" + }, + { + "Parameter": "q", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order" + }, + { + "Parameter": "f", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable" + }, + { + "Parameter": "tp", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "trigger_price is the trigger price used by stop/take orders" + } +] diff --git a/source/json_tables/injective/exchange/v2/Subaccount.json b/source/json_tables/injective/exchange/v2/Subaccount.json new file mode 100644 index 00000000..75fca192 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/Subaccount.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "trader", + "Type": "string", + "Description": "the subaccount's trader address" + }, + { + "Parameter": "subaccount_nonce", + "Type": "uint32", + "Description": "the subaccount's nonce number" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountDeposit.json b/source/json_tables/injective/exchange/v2/SubaccountDeposit.json new file mode 100644 index 00000000..215e6ed7 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountDeposit.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "deposit", + "Type": "Deposit", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountIDs.json b/source/json_tables/injective/exchange/v2/SubaccountIDs.json new file mode 100644 index 00000000..2ea77c4c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountIDs.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "][byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountNonce.json b/source/json_tables/injective/exchange/v2/SubaccountNonce.json new file mode 100644 index 00000000..87760269 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountNonce.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "subaccount_trade_nonce", + "Type": "SubaccountTradeNonce", + "Description": "the subaccount trade nonce" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountOrder.json b/source/json_tables/injective/exchange/v2/SubaccountOrder.json new file mode 100644 index 00000000..3fa82f50 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountOrder.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable" + }, + { + "Parameter": "isReduceOnly", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountOrderData.json b/source/json_tables/injective/exchange/v2/SubaccountOrderData.json new file mode 100644 index 00000000..1bb15474 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountOrderData.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "order", + "Type": "SubaccountOrder", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountOrderbookMetadata.json b/source/json_tables/injective/exchange/v2/SubaccountOrderbookMetadata.json new file mode 100644 index 00000000..286788f1 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountOrderbookMetadata.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "vanilla_limit_order_count", + "Type": "uint32", + "Description": "The number of vanilla limit orders" + }, + { + "Parameter": "reduce_only_limit_order_count", + "Type": "uint32", + "Description": "The number of reduce-only limit orders" + }, + { + "Parameter": "aggregate_reduce_only_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The aggregate quantity of the subaccount's reduce-only limit orders (in human readable format)" + }, + { + "Parameter": "aggregate_vanilla_quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "The aggregate quantity of the subaccount's vanilla limit orders (in human readable format)" + }, + { + "Parameter": "vanilla_conditional_order_count", + "Type": "uint32", + "Description": "The number of vanilla conditional orders" + }, + { + "Parameter": "reduce_only_conditional_order_count", + "Type": "uint32", + "Description": "The number of reduce-only conditional orders" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountOrderbookMetadataWithMarket.json b/source/json_tables/injective/exchange/v2/SubaccountOrderbookMetadataWithMarket.json new file mode 100644 index 00000000..1272e137 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountOrderbookMetadataWithMarket.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "metadata", + "Type": "SubaccountOrderbookMetadata", + "Description": "the subaccount orderbook details" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "true if the orderbook is for a buy orders" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountPosition.json b/source/json_tables/injective/exchange/v2/SubaccountPosition.json new file mode 100644 index 00000000..853919be --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountPosition.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "position", + "Type": "Position", + "Description": "" + }, + { + "Parameter": "subaccount_id", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountTradeNonce.json b/source/json_tables/injective/exchange/v2/SubaccountTradeNonce.json new file mode 100644 index 00000000..a85c3523 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountTradeNonce.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "nonce", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TierStatistic.json b/source/json_tables/injective/exchange/v2/TierStatistic.json new file mode 100644 index 00000000..edbae06e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TierStatistic.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "tier", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "count", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradeHistoryOptions.json b/source/json_tables/injective/exchange/v2/TradeHistoryOptions.json new file mode 100644 index 00000000..1754f37c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradeHistoryOptions.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "trade_grouping_sec", + "Type": "uint64", + "Description": "TradeGroupingSec of 0 means use the chain's default grouping" + }, + { + "Parameter": "max_age", + "Type": "uint64", + "Description": "MaxAge restricts the trade records oldest age in seconds from the current block time to consider. A value of 0 means use all the records present on the chain." + }, + { + "Parameter": "include_raw_history", + "Type": "bool", + "Description": "If IncludeRawHistory is true, the raw underlying data used for the computation is included in the response" + }, + { + "Parameter": "include_metadata", + "Type": "bool", + "Description": "If IncludeMetadata is true, metadata on the computation is included in the response" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradeLog.json b/source/json_tables/injective/exchange/v2/TradeLog.json new file mode 100644 index 00000000..7934a8b5 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradeLog.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "subaccount_id", + "Type": "byte array", + "Description": "bytes32 subaccount ID that executed the trade" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "fee_recipient_address", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradeRecord.json b/source/json_tables/injective/exchange/v2/TradeRecord.json new file mode 100644 index 00000000..12897bce --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradeRecord.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "the timestamp of the trade" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the price of the trade (in human readable format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the trade (in human readable format)" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradeRecords.json b/source/json_tables/injective/exchange/v2/TradeRecords.json new file mode 100644 index 00000000..43ca6ad6 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradeRecords.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "latest_trade_records", + "Type": "TradeRecord array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradingRewardCampaignAccountPendingPoints.json b/source/json_tables/injective/exchange/v2/TradingRewardCampaignAccountPendingPoints.json new file mode 100644 index 00000000..b642d4d2 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradingRewardCampaignAccountPendingPoints.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "reward_pool_start_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "account_points", + "Type": "TradingRewardCampaignAccountPoints array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradingRewardCampaignAccountPoints.json b/source/json_tables/injective/exchange/v2/TradingRewardCampaignAccountPoints.json new file mode 100644 index 00000000..e7a576ce --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradingRewardCampaignAccountPoints.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "points", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradingRewardCampaignBoostInfo.json b/source/json_tables/injective/exchange/v2/TradingRewardCampaignBoostInfo.json new file mode 100644 index 00000000..7acee4e0 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradingRewardCampaignBoostInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "boosted_spot_market_ids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "spot_market_multipliers", + "Type": "PointsMultiplier array", + "Description": "" + }, + { + "Parameter": "boosted_derivative_market_ids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "derivative_market_multipliers", + "Type": "PointsMultiplier array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradingRewardCampaignInfo.json b/source/json_tables/injective/exchange/v2/TradingRewardCampaignInfo.json new file mode 100644 index 00000000..063e672c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradingRewardCampaignInfo.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "campaign_duration_seconds", + "Type": "int64", + "Description": "number of seconds of the duration of each campaign" + }, + { + "Parameter": "quote_denoms", + "Type": "string array", + "Description": "the trading fee quote denoms which will be counted for the rewards" + }, + { + "Parameter": "trading_reward_boost_info", + "Type": "TradingRewardCampaignBoostInfo", + "Description": "the optional boost info for markets" + }, + { + "Parameter": "disqualified_market_ids", + "Type": "string array", + "Description": "the marketIDs which are disqualified from being rewarded" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradingRewardCampaignLaunchProposal.json b/source/json_tables/injective/exchange/v2/TradingRewardCampaignLaunchProposal.json new file mode 100644 index 00000000..9fecd84b --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradingRewardCampaignLaunchProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "campaign_info", + "Type": "TradingRewardCampaignInfo", + "Description": "" + }, + { + "Parameter": "campaign_reward_pools", + "Type": "CampaignRewardPool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradingRewardCampaignUpdateProposal.json b/source/json_tables/injective/exchange/v2/TradingRewardCampaignUpdateProposal.json new file mode 100644 index 00000000..42e4d622 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradingRewardCampaignUpdateProposal.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "campaign_info", + "Type": "TradingRewardCampaignInfo", + "Description": "" + }, + { + "Parameter": "campaign_reward_pools_additions", + "Type": "CampaignRewardPool array", + "Description": "" + }, + { + "Parameter": "campaign_reward_pools_updates", + "Type": "CampaignRewardPool array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TradingRewardPendingPointsUpdateProposal.json b/source/json_tables/injective/exchange/v2/TradingRewardPendingPointsUpdateProposal.json new file mode 100644 index 00000000..cb05897a --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TradingRewardPendingPointsUpdateProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "pending_pool_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "reward_point_updates", + "Type": "RewardPointUpdate array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/TrimmedDerivativeConditionalOrder.json b/source/json_tables/injective/exchange/v2/TrimmedDerivativeConditionalOrder.json new file mode 100644 index 00000000..841fb174 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TrimmedDerivativeConditionalOrder.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order (in human readable format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order (in human readable format)" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin of the order (in human readable format)" + }, + { + "Parameter": "triggerPrice", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price to trigger the order (in human readable format)" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "true if the order is a buy" + }, + { + "Parameter": "isLimit", + "Type": "bool", + "Description": "true if the order is a limit order" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client ID" + } +] diff --git a/source/json_tables/injective/exchange/v2/TrimmedDerivativeLimitOrder.json b/source/json_tables/injective/exchange/v2/TrimmedDerivativeLimitOrder.json new file mode 100644 index 00000000..eaebc65c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TrimmedDerivativeLimitOrder.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order (in human readable format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order (in human readable format)" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "margin of the order (in human readable format)" + }, + { + "Parameter": "fillable", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable (in human readable format)" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "true if the order is a buy" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash (optional)" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional)" + } +] diff --git a/source/json_tables/injective/exchange/v2/TrimmedLimitOrder.json b/source/json_tables/injective/exchange/v2/TrimmedLimitOrder.json new file mode 100644 index 00000000..13d59d05 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TrimmedLimitOrder.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order (in human readable format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order (in human readable format)" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + } +] diff --git a/source/json_tables/injective/exchange/v2/TrimmedSpotLimitOrder.json b/source/json_tables/injective/exchange/v2/TrimmedSpotLimitOrder.json new file mode 100644 index 00000000..44ead1ed --- /dev/null +++ b/source/json_tables/injective/exchange/v2/TrimmedSpotLimitOrder.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price of the order (in human readable format)" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "quantity of the order (in human readable format)" + }, + { + "Parameter": "fillable", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the amount of the quantity remaining fillable (in human readable format)" + }, + { + "Parameter": "isBuy", + "Type": "bool", + "Description": "true if the order is a buy" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash (optional)" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID (optional)" + } +] diff --git a/source/json_tables/injective/exchange/v2/UpdateDenomDecimalsProposal.json b/source/json_tables/injective/exchange/v2/UpdateDenomDecimalsProposal.json new file mode 100644 index 00000000..44c2203f --- /dev/null +++ b/source/json_tables/injective/exchange/v2/UpdateDenomDecimalsProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "denom_decimals", + "Type": "DenomDecimals array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/VolumeRecord.json b/source/json_tables/injective/exchange/v2/VolumeRecord.json new file mode 100644 index 00000000..bd60d0ef --- /dev/null +++ b/source/json_tables/injective/exchange/v2/VolumeRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "maker_volume", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the market's maker volume (in human readable format)" + }, + { + "Parameter": "taker_volume", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the market's taker volume (in human readable format)" + } +] diff --git a/source/json_tables/injective/insurance/GenesisState.json b/source/json_tables/injective/insurance/GenesisState.json new file mode 100644 index 00000000..ae094268 --- /dev/null +++ b/source/json_tables/injective/insurance/GenesisState.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of related to insurance." + }, + { + "Parameter": "insurance_funds", + "Type": "InsuranceFund array", + "Description": "insurance_funds describes the insurance funds available for derivative markets" + }, + { + "Parameter": "redemption_schedule", + "Type": "RedemptionSchedule array", + "Description": "redemption_schedule describes the redemption requests pending" + }, + { + "Parameter": "next_share_denom_id", + "Type": "uint64", + "Description": "next_share_denom_id describes the next share denom id to be used for newly creating insurance fund incremented by 1 per insurance fund creation" + }, + { + "Parameter": "next_redemption_schedule_id", + "Type": "uint64", + "Description": "next_redemption_schedule_id describes next redemption schedule id to be used for next schedule incremented by 1 per redemption request" + } +] diff --git a/source/json_tables/injective/insurance/InsuranceFund.json b/source/json_tables/injective/insurance/InsuranceFund.json new file mode 100644 index 00000000..fab9467a --- /dev/null +++ b/source/json_tables/injective/insurance/InsuranceFund.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "deposit_denom", + "Type": "string", + "Description": "deposit denomination for the given insurance fund" + }, + { + "Parameter": "insurance_pool_token_denom", + "Type": "string", + "Description": "insurance fund pool token denomination for the given insurance fund" + }, + { + "Parameter": "redemption_notice_period_duration", + "Type": "time.Duration", + "Description": "redemption_notice_period_duration defines the minimum notice period duration that must pass after an underwriter sends a redemption request before the underwriter can claim his tokens" + }, + { + "Parameter": "balance", + "Type": "cosmossdk_io_math.Int", + "Description": "balance of fund" + }, + { + "Parameter": "total_share", + "Type": "cosmossdk_io_math.Int", + "Description": "total share tokens minted" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "marketID of the derivative market" + }, + { + "Parameter": "market_ticker", + "Type": "string", + "Description": "ticker of the derivative market" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency of the derivative market OR the oracle symbol for the binary options market." + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency of the derivative market OR the oracle provider for the binary options market." + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type of the binary options or derivative market" + }, + { + "Parameter": "expiry", + "Type": "int64", + "Description": "Expiration time of the derivative market. Should be -1 for perpetual or -2 for binary options markets." + } +] diff --git a/source/json_tables/injective/insurance/MsgCreateInsuranceFund.json b/source/json_tables/injective/insurance/MsgCreateInsuranceFund.json new file mode 100644 index 00000000..713c5efa --- /dev/null +++ b/source/json_tables/injective/insurance/MsgCreateInsuranceFund.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Creator of the insurance fund.", + "Required": "Yes" + }, + { + "Parameter": "ticker", + "Type": "string", + "Description": "Ticker for the derivative market.", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "Coin denom to use for the market quote denom", + "Required": "Yes" + }, + { + "Parameter": "oracle_base", + "Type": "string", + "Description": "Oracle base currency of the derivative market OR the oracle symbol for the binary options market.", + "Required": "Yes" + }, + { + "Parameter": "oracle_quote", + "Type": "string", + "Description": "Oracle quote currency of the derivative market OR the oracle provider for the binary options market.", + "Required": "Yes" + }, + { + "Parameter": "oracle_type", + "Type": "types.OracleType", + "Description": "Oracle type of the binary options or derivative market", + "Required": "Yes" + }, + { + "Parameter": "expiry", + "Type": "int64", + "Description": "Expiration time of the derivative market. Should be -1 for perpetual or -2 for binary options markets.", + "Required": "Yes" + }, + { + "Parameter": "initial_deposit", + "Type": "types1.Coin", + "Description": "Initial deposit of the insurance fund", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/insurance/MsgRequestRedemption.json b/source/json_tables/injective/insurance/MsgRequestRedemption.json new file mode 100644 index 00000000..84a0b1ee --- /dev/null +++ b/source/json_tables/injective/insurance/MsgRequestRedemption.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Address of the underwriter requesting a redemption.", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketID of the insurance fund.", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types1.Coin", + "Description": "Insurance fund share token amount to be redeemed.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/insurance/MsgUnderwrite.json b/source/json_tables/injective/insurance/MsgUnderwrite.json new file mode 100644 index 00000000..a34dcf3b --- /dev/null +++ b/source/json_tables/injective/insurance/MsgUnderwrite.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Address of the underwriter.", + "Required": "Yes" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "MarketID of the insurance fund.", + "Required": "Yes" + }, + { + "Parameter": "deposit", + "Type": "types1.Coin", + "Description": "Amount of quote_denom to underwrite the insurance fund.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/insurance/MsgUpdateParams.json b/source/json_tables/injective/insurance/MsgUpdateParams.json new file mode 100644 index 00000000..09cf988f --- /dev/null +++ b/source/json_tables/injective/insurance/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the insurance parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/insurance/Params.json b/source/json_tables/injective/insurance/Params.json new file mode 100644 index 00000000..bd57c02d --- /dev/null +++ b/source/json_tables/injective/insurance/Params.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "default_redemption_notice_period_duration", + "Type": "time.Duration", + "Description": "default_redemption_notice_period_duration defines the default minimum notice period duration that must pass after an underwriter sends a redemption request before the underwriter can claim his tokens" + } +] diff --git a/source/json_tables/injective/insurance/QueryEstimatedRedemptionsRequest.json b/source/json_tables/injective/insurance/QueryEstimatedRedemptionsRequest.json new file mode 100644 index 00000000..68f85cac --- /dev/null +++ b/source/json_tables/injective/insurance/QueryEstimatedRedemptionsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "marketId", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/insurance/QueryEstimatedRedemptionsResponse.json b/source/json_tables/injective/insurance/QueryEstimatedRedemptionsResponse.json new file mode 100644 index 00000000..84af2d86 --- /dev/null +++ b/source/json_tables/injective/insurance/QueryEstimatedRedemptionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "types.Coin array", + "Description": "" + } +] diff --git a/source/json_tables/injective/insurance/QueryInsuranceFundRequest.json b/source/json_tables/injective/insurance/QueryInsuranceFundRequest.json new file mode 100644 index 00000000..5f79f644 --- /dev/null +++ b/source/json_tables/injective/insurance/QueryInsuranceFundRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "Market ID for the market", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/insurance/QueryInsuranceFundResponse.json b/source/json_tables/injective/insurance/QueryInsuranceFundResponse.json new file mode 100644 index 00000000..8de668bc --- /dev/null +++ b/source/json_tables/injective/insurance/QueryInsuranceFundResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "fund", + "Type": "InsuranceFund", + "Description": "" + } +] diff --git a/source/json_tables/injective/insurance/QueryInsuranceFundsResponse.json b/source/json_tables/injective/insurance/QueryInsuranceFundsResponse.json new file mode 100644 index 00000000..79dc4111 --- /dev/null +++ b/source/json_tables/injective/insurance/QueryInsuranceFundsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "funds", + "Type": "InsuranceFund array", + "Description": "" + } +] diff --git a/source/json_tables/injective/insurance/QueryInsuranceParamsResponse.json b/source/json_tables/injective/insurance/QueryInsuranceParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/insurance/QueryInsuranceParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/insurance/QueryModuleStateResponse.json b/source/json_tables/injective/insurance/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/insurance/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/insurance/QueryPendingRedemptionsRequest.json b/source/json_tables/injective/insurance/QueryPendingRedemptionsRequest.json new file mode 100644 index 00000000..68f85cac --- /dev/null +++ b/source/json_tables/injective/insurance/QueryPendingRedemptionsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "marketId", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/insurance/QueryPendingRedemptionsResponse.json b/source/json_tables/injective/insurance/QueryPendingRedemptionsResponse.json new file mode 100644 index 00000000..84af2d86 --- /dev/null +++ b/source/json_tables/injective/insurance/QueryPendingRedemptionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "types.Coin array", + "Description": "" + } +] diff --git a/source/json_tables/injective/insurance/RedemptionSchedule.json b/source/json_tables/injective/insurance/RedemptionSchedule.json new file mode 100644 index 00000000..862c26ee --- /dev/null +++ b/source/json_tables/injective/insurance/RedemptionSchedule.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "id", + "Type": "uint64", + "Description": "id of redemption schedule" + }, + { + "Parameter": "marketId", + "Type": "string", + "Description": "marketId of insurance fund for the redemption" + }, + { + "Parameter": "redeemer", + "Type": "string", + "Description": "address of the redeemer" + }, + { + "Parameter": "claimable_redemption_time", + "Type": "time.Time", + "Description": "the time after which the redemption can be claimed" + }, + { + "Parameter": "redemption_amount", + "Type": "types1.Coin", + "Description": "the insurance_pool_token amount to redeem" + } +] diff --git a/source/json_tables/injective/ocr/ContractConfig.json b/source/json_tables/injective/ocr/ContractConfig.json new file mode 100644 index 00000000..fb5959b4 --- /dev/null +++ b/source/json_tables/injective/ocr/ContractConfig.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "config_count", + "Type": "uint64", + "Description": "config_count ordinal number of this config setting among all config settings" + }, + { + "Parameter": "signers", + "Type": "string array", + "Description": "signers ith element is address ith oracle uses to sign a report" + }, + { + "Parameter": "transmitters", + "Type": "string array", + "Description": "transmitters ith element is address ith oracle uses to transmit a report via the transmit method" + }, + { + "Parameter": "f", + "Type": "uint32", + "Description": "f maximum number of faulty/dishonest oracles the protocol can tolerate while still working correctly" + }, + { + "Parameter": "onchain_config", + "Type": "byte array", + "Description": "onchain_config serialized data with reporting plugin params on chain." + }, + { + "Parameter": "offchain_config_version", + "Type": "uint64", + "Description": "offchain_config_version version of the serialization format used for \"offchain_config\" parameter" + }, + { + "Parameter": "offchain_config", + "Type": "byte array", + "Description": "offchain_config serialized data used by oracles to configure their offchain operation" + } +] diff --git a/source/json_tables/injective/ocr/Count.json b/source/json_tables/injective/ocr/Count.json new file mode 100644 index 00000000..501bd10f --- /dev/null +++ b/source/json_tables/injective/ocr/Count.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "count", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/EpochAndRound.json b/source/json_tables/injective/ocr/EpochAndRound.json new file mode 100644 index 00000000..7df2cc46 --- /dev/null +++ b/source/json_tables/injective/ocr/EpochAndRound.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "epoch", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "round", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/FeedConfig.json b/source/json_tables/injective/ocr/FeedConfig.json new file mode 100644 index 00000000..a7f6fe5a --- /dev/null +++ b/source/json_tables/injective/ocr/FeedConfig.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "signers", + "Type": "string array", + "Description": "signers ith element is address ith oracle uses to sign a report" + }, + { + "Parameter": "transmitters", + "Type": "string array", + "Description": "transmitters ith element is address ith oracle uses to transmit a report via the transmit method" + }, + { + "Parameter": "f", + "Type": "uint32", + "Description": "f maximum number of faulty/dishonest oracles the protocol can tolerate while still working correctly" + }, + { + "Parameter": "onchain_config", + "Type": "byte array", + "Description": "onchain_config serialized data with reporting plugin params on chain." + }, + { + "Parameter": "offchain_config_version", + "Type": "uint64", + "Description": "offchain_config_version version of the serialization format used for \"offchain_config\" parameter" + }, + { + "Parameter": "offchain_config", + "Type": "byte array", + "Description": "offchain_config serialized data used by oracles to configure their offchain operation" + }, + { + "Parameter": "module_params", + "Type": "ModuleParams", + "Description": "feed-specific params for the Cosmos module." + } +] diff --git a/source/json_tables/injective/ocr/FeedConfigInfo.json b/source/json_tables/injective/ocr/FeedConfigInfo.json new file mode 100644 index 00000000..bc5ed575 --- /dev/null +++ b/source/json_tables/injective/ocr/FeedConfigInfo.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "latest_config_digest", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "f", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "n", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "config_count", + "Type": "uint64", + "Description": "config_count ordinal number of this config setting among all config settings" + }, + { + "Parameter": "latest_config_block_number", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/FeedCounts.json b/source/json_tables/injective/ocr/FeedCounts.json new file mode 100644 index 00000000..b2734a18 --- /dev/null +++ b/source/json_tables/injective/ocr/FeedCounts.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "counts", + "Type": "Count array", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/FeedEpochAndRound.json b/source/json_tables/injective/ocr/FeedEpochAndRound.json new file mode 100644 index 00000000..eeb2e50f --- /dev/null +++ b/source/json_tables/injective/ocr/FeedEpochAndRound.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "epoch_and_round", + "Type": "EpochAndRound", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/FeedLatestAggregatorRoundIDs.json b/source/json_tables/injective/ocr/FeedLatestAggregatorRoundIDs.json new file mode 100644 index 00000000..11bfe0b2 --- /dev/null +++ b/source/json_tables/injective/ocr/FeedLatestAggregatorRoundIDs.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "aggregator_round_id", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/FeedProperties.json b/source/json_tables/injective/ocr/FeedProperties.json new file mode 100644 index 00000000..243e485f --- /dev/null +++ b/source/json_tables/injective/ocr/FeedProperties.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "feed_id is an unique ID for the target of this config" + }, + { + "Parameter": "f", + "Type": "uint32", + "Description": "f maximum number of faulty/dishonest oracles the protocol can tolerate while still working correctly" + }, + { + "Parameter": "onchain_config", + "Type": "byte array", + "Description": "onchain_config serialized data with reporting plugin params on chain." + }, + { + "Parameter": "offchain_config_version", + "Type": "uint64", + "Description": "offchain_config_version version of the serialization format used for \"offchain_config\" parameter" + }, + { + "Parameter": "offchain_config", + "Type": "byte array", + "Description": "offchain_config serialized data used by oracles to configure their offchain operation" + }, + { + "Parameter": "min_answer", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "lowest answer the median of a report is allowed to be" + }, + { + "Parameter": "max_answer", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "highest answer the median of a report is allowed to be" + }, + { + "Parameter": "link_per_observation", + "Type": "cosmossdk_io_math.Int", + "Description": "Fixed LINK reward for each observer" + }, + { + "Parameter": "link_per_transmission", + "Type": "cosmossdk_io_math.Int", + "Description": "Fixed LINK reward for transmitter" + }, + { + "Parameter": "unique_reports", + "Type": "bool", + "Description": "Enables unique reports" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "short human-readable description of observable this feed's answers pertain to" + } +] diff --git a/source/json_tables/injective/ocr/FeedTransmission.json b/source/json_tables/injective/ocr/FeedTransmission.json new file mode 100644 index 00000000..7cff0bde --- /dev/null +++ b/source/json_tables/injective/ocr/FeedTransmission.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "transmission", + "Type": "Transmission", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/GasReimbursements.json b/source/json_tables/injective/ocr/GasReimbursements.json new file mode 100644 index 00000000..a7e359ec --- /dev/null +++ b/source/json_tables/injective/ocr/GasReimbursements.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "reimbursements", + "Type": "types.Coin array", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/GenesisState.json b/source/json_tables/injective/ocr/GenesisState.json new file mode 100644 index 00000000..0a963af4 --- /dev/null +++ b/source/json_tables/injective/ocr/GenesisState.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of related to OCR." + }, + { + "Parameter": "feed_configs", + "Type": "FeedConfig array", + "Description": "feed_configs stores all of the supported OCR feeds" + }, + { + "Parameter": "latest_epoch_and_rounds", + "Type": "FeedEpochAndRound array", + "Description": "latest_epoch_and_rounds stores the latest epoch and round for each feedId" + }, + { + "Parameter": "feed_transmissions", + "Type": "FeedTransmission array", + "Description": "feed_transmissions stores the last transmission for each feed" + }, + { + "Parameter": "latest_aggregator_round_ids", + "Type": "FeedLatestAggregatorRoundIDs array", + "Description": "latest_aggregator_round_ids stores the latest aggregator round ID for each feedId" + }, + { + "Parameter": "reward_pools", + "Type": "RewardPool array", + "Description": "reward_pools stores the reward pools" + }, + { + "Parameter": "feed_observation_counts", + "Type": "FeedCounts array", + "Description": "feed_observation_counts stores the feed observation counts" + }, + { + "Parameter": "feed_transmission_counts", + "Type": "FeedCounts array", + "Description": "feed_transmission_counts stores the feed transmission counts" + }, + { + "Parameter": "pending_payeeships", + "Type": "PendingPayeeship array", + "Description": "pending_payeeships stores the pending payeeships" + } +] diff --git a/source/json_tables/injective/ocr/ModuleParams.json b/source/json_tables/injective/ocr/ModuleParams.json new file mode 100644 index 00000000..8859b5d5 --- /dev/null +++ b/source/json_tables/injective/ocr/ModuleParams.json @@ -0,0 +1,52 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "feed_id is an unique ID for the target of this config" + }, + { + "Parameter": "min_answer", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "lowest answer the median of a report is allowed to be" + }, + { + "Parameter": "max_answer", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "highest answer the median of a report is allowed to be" + }, + { + "Parameter": "link_per_observation", + "Type": "cosmossdk_io_math.Int", + "Description": "Fixed LINK reward for each observer" + }, + { + "Parameter": "link_per_transmission", + "Type": "cosmossdk_io_math.Int", + "Description": "Fixed LINK reward for transmitter" + }, + { + "Parameter": "link_denom", + "Type": "string", + "Description": "Native denom for LINK coin in the bank keeper" + }, + { + "Parameter": "unique_reports", + "Type": "bool", + "Description": "Enables unique reports" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "short human-readable description of observable this feed's answers pertain to" + }, + { + "Parameter": "feed_admin", + "Type": "string", + "Description": "feed administrator" + }, + { + "Parameter": "billing_admin", + "Type": "string", + "Description": "feed billing administrator" + } +] diff --git a/source/json_tables/injective/ocr/MsgAcceptPayeeship.json b/source/json_tables/injective/ocr/MsgAcceptPayeeship.json new file mode 100644 index 00000000..3baf91b3 --- /dev/null +++ b/source/json_tables/injective/ocr/MsgAcceptPayeeship.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "payee", + "Type": "string", + "Description": "new payee address", + "Required": "Yes" + }, + { + "Parameter": "transmitter", + "Type": "string", + "Description": "transmitter address of oracle whose payee is changing", + "Required": "Yes" + }, + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/MsgCreateFeed.json b/source/json_tables/injective/ocr/MsgCreateFeed.json new file mode 100644 index 00000000..85ab722d --- /dev/null +++ b/source/json_tables/injective/ocr/MsgCreateFeed.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "config", + "Type": "FeedConfig", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/ocr/MsgFundFeedRewardPool.json b/source/json_tables/injective/ocr/MsgFundFeedRewardPool.json new file mode 100644 index 00000000..0aea3a64 --- /dev/null +++ b/source/json_tables/injective/ocr/MsgFundFeedRewardPool.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/MsgSetPayees.json b/source/json_tables/injective/ocr/MsgSetPayees.json new file mode 100644 index 00000000..f29d4e85 --- /dev/null +++ b/source/json_tables/injective/ocr/MsgSetPayees.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "transmitters", + "Type": "string array", + "Description": "addresses oracles use to transmit the reports", + "Required": "Yes" + }, + { + "Parameter": "payees", + "Type": "string array", + "Description": "addresses of payees corresponding to list of transmitters", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/MsgTransferPayeeship.json b/source/json_tables/injective/ocr/MsgTransferPayeeship.json new file mode 100644 index 00000000..605e9dcf --- /dev/null +++ b/source/json_tables/injective/ocr/MsgTransferPayeeship.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "transmitter address of oracle whose payee is changing", + "Required": "Yes" + }, + { + "Parameter": "transmitter", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "proposed", + "Type": "string", + "Description": "new payee address", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/MsgTransmit.json b/source/json_tables/injective/ocr/MsgTransmit.json new file mode 100644 index 00000000..4ff433ab --- /dev/null +++ b/source/json_tables/injective/ocr/MsgTransmit.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "transmitter", + "Type": "string", + "Description": "Address of the transmitter", + "Required": "Yes" + }, + { + "Parameter": "config_digest", + "Type": "byte array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "epoch", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "round", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "extra_hash", + "Type": "byte array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "report", + "Type": "Report", + "Description": "", + "Required": "No" + }, + { + "Parameter": "signatures", + "Type": "][byte array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/MsgUpdateFeed.json b/source/json_tables/injective/ocr/MsgUpdateFeed.json new file mode 100644 index 00000000..f4907c88 --- /dev/null +++ b/source/json_tables/injective/ocr/MsgUpdateFeed.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "feed_id", + "Type": "string", + "Description": "feed_id is an unique ID for the target of this config", + "Required": "Yes" + }, + { + "Parameter": "signers", + "Type": "string array", + "Description": "signers ith element is address ith oracle uses to sign a report", + "Required": "Yes" + }, + { + "Parameter": "transmitters", + "Type": "string array", + "Description": "transmitters ith element is address ith oracle uses to transmit a report via the transmit method", + "Required": "Yes" + }, + { + "Parameter": "link_per_observation", + "Type": "cosmossdk_io_math.Int", + "Description": "Fixed LINK reward for each observer", + "Required": "No" + }, + { + "Parameter": "link_per_transmission", + "Type": "cosmossdk_io_math.Int", + "Description": "Fixed LINK reward for transmitter", + "Required": "No" + }, + { + "Parameter": "link_denom", + "Type": "string", + "Description": "Native denom for LINK coin in the bank keeper", + "Required": "Yes" + }, + { + "Parameter": "feed_admin", + "Type": "string", + "Description": "feed administrator", + "Required": "Yes" + }, + { + "Parameter": "billing_admin", + "Type": "string", + "Description": "feed billing administrator", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/MsgUpdateParams.json b/source/json_tables/injective/ocr/MsgUpdateParams.json new file mode 100644 index 00000000..7e63c10e --- /dev/null +++ b/source/json_tables/injective/ocr/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the ocr parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/MsgWithdrawFeedRewardPool.json b/source/json_tables/injective/ocr/MsgWithdrawFeedRewardPool.json new file mode 100644 index 00000000..0aea3a64 --- /dev/null +++ b/source/json_tables/injective/ocr/MsgWithdrawFeedRewardPool.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/OracleObservationsCounts.json b/source/json_tables/injective/ocr/OracleObservationsCounts.json new file mode 100644 index 00000000..d230c3a3 --- /dev/null +++ b/source/json_tables/injective/ocr/OracleObservationsCounts.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "counts", + "Type": "uint32 array", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/Params.json b/source/json_tables/injective/ocr/Params.json new file mode 100644 index 00000000..3b61528e --- /dev/null +++ b/source/json_tables/injective/ocr/Params.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "link_denom", + "Type": "string", + "Description": "Native denom for LINK coin in the bank keeper" + }, + { + "Parameter": "payout_block_interval", + "Type": "uint64", + "Description": "The block number interval at which payouts are made" + }, + { + "Parameter": "module_admin", + "Type": "string", + "Description": "The admin for the OCR module" + } +] diff --git a/source/json_tables/injective/ocr/Payee.json b/source/json_tables/injective/ocr/Payee.json new file mode 100644 index 00000000..f47628d5 --- /dev/null +++ b/source/json_tables/injective/ocr/Payee.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "transmitter_addr", + "Type": "string", + "Description": "" + }, + { + "Parameter": "payment_addr", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/PendingPayeeship.json b/source/json_tables/injective/ocr/PendingPayeeship.json new file mode 100644 index 00000000..5e5d491d --- /dev/null +++ b/source/json_tables/injective/ocr/PendingPayeeship.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "transmitter", + "Type": "string", + "Description": "" + }, + { + "Parameter": "proposed_payee", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/QueryFeedConfigInfoRequest.json b/source/json_tables/injective/ocr/QueryFeedConfigInfoRequest.json new file mode 100644 index 00000000..06eae36a --- /dev/null +++ b/source/json_tables/injective/ocr/QueryFeedConfigInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/QueryFeedConfigInfoResponse.json b/source/json_tables/injective/ocr/QueryFeedConfigInfoResponse.json new file mode 100644 index 00000000..f4f1826e --- /dev/null +++ b/source/json_tables/injective/ocr/QueryFeedConfigInfoResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "feed_config_info", + "Type": "FeedConfigInfo", + "Description": "" + }, + { + "Parameter": "epoch_and_round", + "Type": "EpochAndRound", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/QueryFeedConfigRequest.json b/source/json_tables/injective/ocr/QueryFeedConfigRequest.json new file mode 100644 index 00000000..06eae36a --- /dev/null +++ b/source/json_tables/injective/ocr/QueryFeedConfigRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/QueryFeedConfigResponse.json b/source/json_tables/injective/ocr/QueryFeedConfigResponse.json new file mode 100644 index 00000000..7a17a001 --- /dev/null +++ b/source/json_tables/injective/ocr/QueryFeedConfigResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "feed_config_info", + "Type": "FeedConfigInfo", + "Description": "" + }, + { + "Parameter": "feed_config", + "Type": "FeedConfig", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/QueryLatestRoundRequest.json b/source/json_tables/injective/ocr/QueryLatestRoundRequest.json new file mode 100644 index 00000000..06eae36a --- /dev/null +++ b/source/json_tables/injective/ocr/QueryLatestRoundRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/QueryLatestRoundResponse.json b/source/json_tables/injective/ocr/QueryLatestRoundResponse.json new file mode 100644 index 00000000..23094704 --- /dev/null +++ b/source/json_tables/injective/ocr/QueryLatestRoundResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "latest_round_id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "data", + "Type": "Transmission", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/QueryLatestTransmissionDetailsRequest.json b/source/json_tables/injective/ocr/QueryLatestTransmissionDetailsRequest.json new file mode 100644 index 00000000..06eae36a --- /dev/null +++ b/source/json_tables/injective/ocr/QueryLatestTransmissionDetailsRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/QueryLatestTransmissionDetailsResponse.json b/source/json_tables/injective/ocr/QueryLatestTransmissionDetailsResponse.json new file mode 100644 index 00000000..407adb80 --- /dev/null +++ b/source/json_tables/injective/ocr/QueryLatestTransmissionDetailsResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "config_digest", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "epoch_and_round", + "Type": "EpochAndRound", + "Description": "" + }, + { + "Parameter": "data", + "Type": "Transmission", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/QueryModuleStateResponse.json b/source/json_tables/injective/ocr/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/ocr/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/QueryOwedAmountRequest.json b/source/json_tables/injective/ocr/QueryOwedAmountRequest.json new file mode 100644 index 00000000..dc4625f3 --- /dev/null +++ b/source/json_tables/injective/ocr/QueryOwedAmountRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "transmitter", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/ocr/QueryOwedAmountResponse.json b/source/json_tables/injective/ocr/QueryOwedAmountResponse.json new file mode 100644 index 00000000..043cecec --- /dev/null +++ b/source/json_tables/injective/ocr/QueryOwedAmountResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/QueryParamsResponse.json b/source/json_tables/injective/ocr/QueryParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/ocr/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/Report.json b/source/json_tables/injective/ocr/Report.json new file mode 100644 index 00000000..86bc6b95 --- /dev/null +++ b/source/json_tables/injective/ocr/Report.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "observations_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "observers", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "observations", + "Type": "cosmossdk_io_math.LegacyDec array", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/ReportToSign.json b/source/json_tables/injective/ocr/ReportToSign.json new file mode 100644 index 00000000..de016881 --- /dev/null +++ b/source/json_tables/injective/ocr/ReportToSign.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "config_digest", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "epoch", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "round", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "extra_hash", + "Type": "byte array", + "Description": "" + }, + { + "Parameter": "report", + "Type": "byte array", + "Description": "Opaque report" + } +] diff --git a/source/json_tables/injective/ocr/RewardPool.json b/source/json_tables/injective/ocr/RewardPool.json new file mode 100644 index 00000000..bdc601a8 --- /dev/null +++ b/source/json_tables/injective/ocr/RewardPool.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/SetBatchConfigProposal.json b/source/json_tables/injective/ocr/SetBatchConfigProposal.json new file mode 100644 index 00000000..82649943 --- /dev/null +++ b/source/json_tables/injective/ocr/SetBatchConfigProposal.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "signers", + "Type": "string array", + "Description": "signers ith element is address ith oracle uses to sign a report" + }, + { + "Parameter": "transmitters", + "Type": "string array", + "Description": "transmitters ith element is address ith oracle uses to transmit a report via the transmit method" + }, + { + "Parameter": "link_denom", + "Type": "string", + "Description": "Native denom for LINK coin in the bank keeper" + }, + { + "Parameter": "feed_properties", + "Type": "FeedProperties array", + "Description": "feed properties" + } +] diff --git a/source/json_tables/injective/ocr/SetConfigProposal.json b/source/json_tables/injective/ocr/SetConfigProposal.json new file mode 100644 index 00000000..4a98d9f6 --- /dev/null +++ b/source/json_tables/injective/ocr/SetConfigProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "config", + "Type": "FeedConfig", + "Description": "" + } +] diff --git a/source/json_tables/injective/ocr/Transmission.json b/source/json_tables/injective/ocr/Transmission.json new file mode 100644 index 00000000..aba31750 --- /dev/null +++ b/source/json_tables/injective/ocr/Transmission.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "answer", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "observations_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "transmission_timestamp", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/AssetPair.json b/source/json_tables/injective/oracle/AssetPair.json new file mode 100644 index 00000000..6d55e5ce --- /dev/null +++ b/source/json_tables/injective/oracle/AssetPair.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "asset_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "signed_prices", + "Type": "SignedPriceOfAssetPair array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/AuthorizeBandOracleRequestProposal.json b/source/json_tables/injective/oracle/AuthorizeBandOracleRequestProposal.json new file mode 100644 index 00000000..6896e358 --- /dev/null +++ b/source/json_tables/injective/oracle/AuthorizeBandOracleRequestProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "request", + "Type": "BandOracleRequest", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/BandIBCParams.json b/source/json_tables/injective/oracle/BandIBCParams.json new file mode 100644 index 00000000..a32659f6 --- /dev/null +++ b/source/json_tables/injective/oracle/BandIBCParams.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "band_ibc_enabled", + "Type": "bool", + "Description": "true if Band IBC should be enabled" + }, + { + "Parameter": "ibc_request_interval", + "Type": "int64", + "Description": "block request interval to send Band IBC prices" + }, + { + "Parameter": "ibc_source_channel", + "Type": "string", + "Description": "band IBC source channel" + }, + { + "Parameter": "ibc_version", + "Type": "string", + "Description": "band IBC version" + }, + { + "Parameter": "ibc_port_id", + "Type": "string", + "Description": "band IBC portID" + }, + { + "Parameter": "legacy_oracle_ids", + "Type": "int64 array", + "Description": "legacy oracle scheme ids" + } +] diff --git a/source/json_tables/injective/oracle/BandOracleRequest.json b/source/json_tables/injective/oracle/BandOracleRequest.json new file mode 100644 index 00000000..b443336d --- /dev/null +++ b/source/json_tables/injective/oracle/BandOracleRequest.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "request_id", + "Type": "uint64", + "Description": "Unique Identifier for band ibc oracle request", + "Required": "Yes" + }, + { + "Parameter": "oracle_script_id", + "Type": "int64", + "Description": "OracleScriptID is the unique identifier of the oracle script to be executed.", + "Required": "Yes" + }, + { + "Parameter": "symbols", + "Type": "string array", + "Description": "Symbols is the list of symbols to prepare in the calldata", + "Required": "Yes" + }, + { + "Parameter": "ask_count", + "Type": "uint64", + "Description": "AskCount is the number of validators that are requested to respond to this oracle request. Higher value means more security, at a higher gas cost.", + "Required": "Yes" + }, + { + "Parameter": "min_count", + "Type": "uint64", + "Description": "MinCount is the minimum number of validators necessary for the request to proceed to the execution phase. Higher value means more security, at the cost of liveness.", + "Required": "Yes" + }, + { + "Parameter": "fee_limit", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "FeeLimit is the maximum tokens that will be paid to all data source providers.", + "Required": "Yes" + }, + { + "Parameter": "prepare_gas", + "Type": "uint64", + "Description": "PrepareGas is amount of gas to pay to prepare raw requests", + "Required": "Yes" + }, + { + "Parameter": "execute_gas", + "Type": "uint64", + "Description": "ExecuteGas is amount of gas to reserve for executing", + "Required": "Yes" + }, + { + "Parameter": "min_source_count", + "Type": "uint64", + "Description": "MinSourceCount is the minimum number of data sources that must be used by each validator", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/BandPriceState.json b/source/json_tables/injective/oracle/BandPriceState.json new file mode 100644 index 00000000..43e22662 --- /dev/null +++ b/source/json_tables/injective/oracle/BandPriceState.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "" + }, + { + "Parameter": "rate", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "resolve_time", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/CalldataRecord.json b/source/json_tables/injective/oracle/CalldataRecord.json new file mode 100644 index 00000000..79df1fc9 --- /dev/null +++ b/source/json_tables/injective/oracle/CalldataRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "client_id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "calldata", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/ChainlinkPriceState.json b/source/json_tables/injective/oracle/ChainlinkPriceState.json new file mode 100644 index 00000000..d3bc42e7 --- /dev/null +++ b/source/json_tables/injective/oracle/ChainlinkPriceState.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "answer", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/CoinbasePriceState.json b/source/json_tables/injective/oracle/CoinbasePriceState.json new file mode 100644 index 00000000..1524978a --- /dev/null +++ b/source/json_tables/injective/oracle/CoinbasePriceState.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "kind", + "Type": "string", + "Description": "kind should always be \"prices\"" + }, + { + "Parameter": "timestamp", + "Type": "uint64", + "Description": "timestamp of the when the price was signed by coinbase" + }, + { + "Parameter": "key", + "Type": "string", + "Description": "the symbol of the price, e.g. BTC" + }, + { + "Parameter": "value", + "Type": "uint64", + "Description": "the value of the price scaled by 1e6" + }, + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "the price state" + } +] diff --git a/source/json_tables/injective/oracle/EnableBandIBCProposal.json b/source/json_tables/injective/oracle/EnableBandIBCProposal.json new file mode 100644 index 00000000..72e00090 --- /dev/null +++ b/source/json_tables/injective/oracle/EnableBandIBCProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "band_ibc_params", + "Type": "BandIBCParams", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/GenesisState.json b/source/json_tables/injective/oracle/GenesisState.json new file mode 100644 index 00000000..d9fce23d --- /dev/null +++ b/source/json_tables/injective/oracle/GenesisState.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of related to oracle." + }, + { + "Parameter": "band_relayers", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "band_price_states", + "Type": "BandPriceState array", + "Description": "" + }, + { + "Parameter": "price_feed_price_states", + "Type": "PriceFeedState array", + "Description": "" + }, + { + "Parameter": "coinbase_price_states", + "Type": "CoinbasePriceState array", + "Description": "" + }, + { + "Parameter": "band_ibc_price_states", + "Type": "BandPriceState array", + "Description": "" + }, + { + "Parameter": "band_ibc_oracle_requests", + "Type": "BandOracleRequest array", + "Description": "" + }, + { + "Parameter": "band_ibc_params", + "Type": "BandIBCParams", + "Description": "" + }, + { + "Parameter": "band_ibc_latest_client_id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "calldata_records", + "Type": "CalldataRecord array", + "Description": "" + }, + { + "Parameter": "band_ibc_latest_request_id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "chainlink_price_states", + "Type": "ChainlinkPriceState array", + "Description": "" + }, + { + "Parameter": "historical_price_records", + "Type": "PriceRecords array", + "Description": "" + }, + { + "Parameter": "provider_states", + "Type": "ProviderState array", + "Description": "" + }, + { + "Parameter": "pyth_price_states", + "Type": "PythPriceState array", + "Description": "" + }, + { + "Parameter": "stork_price_states", + "Type": "StorkPriceState array", + "Description": "" + }, + { + "Parameter": "stork_publishers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/GrantBandOraclePrivilegeProposal.json b/source/json_tables/injective/oracle/GrantBandOraclePrivilegeProposal.json new file mode 100644 index 00000000..5717b0ed --- /dev/null +++ b/source/json_tables/injective/oracle/GrantBandOraclePrivilegeProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/GrantPriceFeederPrivilegeProposal.json b/source/json_tables/injective/oracle/GrantPriceFeederPrivilegeProposal.json new file mode 100644 index 00000000..75614580 --- /dev/null +++ b/source/json_tables/injective/oracle/GrantPriceFeederPrivilegeProposal.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "base", + "Type": "string", + "Description": "" + }, + { + "Parameter": "quote", + "Type": "string", + "Description": "" + }, + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/GrantProviderPrivilegeProposal.json b/source/json_tables/injective/oracle/GrantProviderPrivilegeProposal.json new file mode 100644 index 00000000..c93db247 --- /dev/null +++ b/source/json_tables/injective/oracle/GrantProviderPrivilegeProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "provider", + "Type": "string", + "Description": "" + }, + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/GrantStorkPublisherPrivilegeProposal.json b/source/json_tables/injective/oracle/GrantStorkPublisherPrivilegeProposal.json new file mode 100644 index 00000000..25d1775f --- /dev/null +++ b/source/json_tables/injective/oracle/GrantStorkPublisherPrivilegeProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "stork_publishers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/LastPriceTimestamps.json b/source/json_tables/injective/oracle/LastPriceTimestamps.json new file mode 100644 index 00000000..88e0a287 --- /dev/null +++ b/source/json_tables/injective/oracle/LastPriceTimestamps.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "last_price_timestamps", + "Type": "SymbolPriceTimestamp array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/MetadataStatistics.json b/source/json_tables/injective/oracle/MetadataStatistics.json new file mode 100644 index 00000000..b49bd941 --- /dev/null +++ b/source/json_tables/injective/oracle/MetadataStatistics.json @@ -0,0 +1,47 @@ +[ + { + "Parameter": "group_count", + "Type": "uint32", + "Description": "GroupCount refers to the number of groups used. Equals RecordsSampleSize if no grouping is used" + }, + { + "Parameter": "records_sample_size", + "Type": "uint32", + "Description": "RecordsSampleSize refers to the total number of records used." + }, + { + "Parameter": "mean", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "Mean refers to the arithmetic mean For trades, the mean is the VWAP computed over the grouped trade records ∑ (price * quantity) / ∑ quantity For oracle prices, the mean is computed over the price records ∑ (price) / prices_count" + }, + { + "Parameter": "twap", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "TWAP refers to the time-weighted average price which equals ∑ (price_i * ∆t_i) / ∑ ∆t_i where ∆t_i = t_i - t_{i-1}" + }, + { + "Parameter": "first_timestamp", + "Type": "int64", + "Description": "FirstTimestamp is the timestamp of the oldest record considered" + }, + { + "Parameter": "last_timestamp", + "Type": "int64", + "Description": "LastTimestamp is the timestamp of the youngest record considered" + }, + { + "Parameter": "min_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "MinPrice refers to the smallest individual raw price considered" + }, + { + "Parameter": "max_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "MaxPrice refers to the largest individual raw price considered" + }, + { + "Parameter": "median_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "MedianPrice refers to the median individual raw price considered" + } +] diff --git a/source/json_tables/injective/oracle/MsgRelayBandRates.json b/source/json_tables/injective/oracle/MsgRelayBandRates.json new file mode 100644 index 00000000..00d28af8 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelayBandRates.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "relayer", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "symbols", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "rates", + "Type": "uint64 array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "resolve_times", + "Type": "uint64 array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "requestIDs", + "Type": "uint64 array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/MsgRelayCoinbaseMessages.json b/source/json_tables/injective/oracle/MsgRelayCoinbaseMessages.json new file mode 100644 index 00000000..ba63f124 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelayCoinbaseMessages.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "messages", + "Type": "][byte array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "signatures", + "Type": "][byte array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/MsgRelayPriceFeedPrice.json b/source/json_tables/injective/oracle/MsgRelayPriceFeedPrice.json new file mode 100644 index 00000000..ace26b31 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelayPriceFeedPrice.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "base", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "quote", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec array", + "Description": "price defines the price of the oracle base and quote", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/MsgRelayProviderPrices.json b/source/json_tables/injective/oracle/MsgRelayProviderPrices.json new file mode 100644 index 00000000..b19b1cf2 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelayProviderPrices.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "provider", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "symbols", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "prices", + "Type": "cosmossdk_io_math.LegacyDec array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/MsgRelayPythPrices.json b/source/json_tables/injective/oracle/MsgRelayPythPrices.json new file mode 100644 index 00000000..f184eb2c --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelayPythPrices.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "price_attestations", + "Type": "PriceAttestation array", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/oracle/MsgRelayStorkPrices.json b/source/json_tables/injective/oracle/MsgRelayStorkPrices.json new file mode 100644 index 00000000..22642328 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelayStorkPrices.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "asset_pairs", + "Type": "AssetPair array", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/oracle/MsgRequestBandIBCRates.json b/source/json_tables/injective/oracle/MsgRequestBandIBCRates.json new file mode 100644 index 00000000..c6c39050 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRequestBandIBCRates.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "request_id", + "Type": "uint64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/MsgUpdateParams.json b/source/json_tables/injective/oracle/MsgUpdateParams.json new file mode 100644 index 00000000..c7c877c1 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the oracle parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/OracleHistoryOptions.json b/source/json_tables/injective/oracle/OracleHistoryOptions.json new file mode 100644 index 00000000..a31ac3d9 --- /dev/null +++ b/source/json_tables/injective/oracle/OracleHistoryOptions.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "max_age", + "Type": "uint64", + "Description": "MaxAge restricts the oracle price records oldest age in seconds from the current block time to consider. A value of 0 means use all the records present on the chain." + }, + { + "Parameter": "include_raw_history", + "Type": "bool", + "Description": "If IncludeRawHistory is true, the raw underlying data used for the computation is included in the response" + }, + { + "Parameter": "include_metadata", + "Type": "bool", + "Description": "If IncludeMetadata is true, metadata on the computation is included in the response" + } +] diff --git a/source/json_tables/injective/oracle/OracleInfo.json b/source/json_tables/injective/oracle/OracleInfo.json new file mode 100644 index 00000000..27441ed4 --- /dev/null +++ b/source/json_tables/injective/oracle/OracleInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "" + }, + { + "Parameter": "oracle_type", + "Type": "OracleType", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/Params.json b/source/json_tables/injective/oracle/Params.json new file mode 100644 index 00000000..45d99138 --- /dev/null +++ b/source/json_tables/injective/oracle/Params.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "pyth_contract", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PriceAttestation.json b/source/json_tables/injective/oracle/PriceAttestation.json new file mode 100644 index 00000000..6ad27094 --- /dev/null +++ b/source/json_tables/injective/oracle/PriceAttestation.json @@ -0,0 +1,42 @@ +[ + { + "Parameter": "price_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "price", + "Type": "int64", + "Description": "MaxPrice refers to the largest individual raw price considered" + }, + { + "Parameter": "conf", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "expo", + "Type": "int32", + "Description": "" + }, + { + "Parameter": "ema_price", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "ema_conf", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "ema_expo", + "Type": "int32", + "Description": "" + }, + { + "Parameter": "publish_time", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PriceFeedInfo.json b/source/json_tables/injective/oracle/PriceFeedInfo.json new file mode 100644 index 00000000..33dd5b51 --- /dev/null +++ b/source/json_tables/injective/oracle/PriceFeedInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "base", + "Type": "string", + "Description": "" + }, + { + "Parameter": "quote", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PriceFeedPrice.json b/source/json_tables/injective/oracle/PriceFeedPrice.json new file mode 100644 index 00000000..d150c847 --- /dev/null +++ b/source/json_tables/injective/oracle/PriceFeedPrice.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PriceFeedState.json b/source/json_tables/injective/oracle/PriceFeedState.json new file mode 100644 index 00000000..f8cb0c29 --- /dev/null +++ b/source/json_tables/injective/oracle/PriceFeedState.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "base", + "Type": "string", + "Description": "" + }, + { + "Parameter": "quote", + "Type": "string", + "Description": "" + }, + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "" + }, + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PricePairState.json b/source/json_tables/injective/oracle/PricePairState.json new file mode 100644 index 00000000..79c61915 --- /dev/null +++ b/source/json_tables/injective/oracle/PricePairState.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "pair_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "base_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "quote_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "base_cumulative_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "quote_cumulative_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "base_timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "quote_timestamp", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PriceRecord.json b/source/json_tables/injective/oracle/PriceRecord.json new file mode 100644 index 00000000..5539668e --- /dev/null +++ b/source/json_tables/injective/oracle/PriceRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PriceRecords.json b/source/json_tables/injective/oracle/PriceRecords.json new file mode 100644 index 00000000..31070107 --- /dev/null +++ b/source/json_tables/injective/oracle/PriceRecords.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "oracle", + "Type": "OracleType", + "Description": "" + }, + { + "Parameter": "symbol_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "latest_price_records", + "Type": "PriceRecord array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PriceState.json b/source/json_tables/injective/oracle/PriceState.json new file mode 100644 index 00000000..121d5664 --- /dev/null +++ b/source/json_tables/injective/oracle/PriceState.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "cumulative_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/ProviderInfo.json b/source/json_tables/injective/oracle/ProviderInfo.json new file mode 100644 index 00000000..2b3e85e3 --- /dev/null +++ b/source/json_tables/injective/oracle/ProviderInfo.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "provider", + "Type": "string", + "Description": "" + }, + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/ProviderPriceState.json b/source/json_tables/injective/oracle/ProviderPriceState.json new file mode 100644 index 00000000..aeebadc3 --- /dev/null +++ b/source/json_tables/injective/oracle/ProviderPriceState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "" + }, + { + "Parameter": "state", + "Type": "PriceState", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/ProviderState.json b/source/json_tables/injective/oracle/ProviderState.json new file mode 100644 index 00000000..b6221940 --- /dev/null +++ b/source/json_tables/injective/oracle/ProviderState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "provider_info", + "Type": "ProviderInfo", + "Description": "" + }, + { + "Parameter": "provider_price_states", + "Type": "ProviderPriceState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/PythPriceState.json b/source/json_tables/injective/oracle/PythPriceState.json new file mode 100644 index 00000000..03cbcb23 --- /dev/null +++ b/source/json_tables/injective/oracle/PythPriceState.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "price_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "ema_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "ema_conf", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "conf", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "publish_time", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryBandIBCPriceStatesResponse.json b/source/json_tables/injective/oracle/QueryBandIBCPriceStatesResponse.json new file mode 100644 index 00000000..71bd5503 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryBandIBCPriceStatesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_states", + "Type": "BandPriceState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryBandPriceStatesResponse.json b/source/json_tables/injective/oracle/QueryBandPriceStatesResponse.json new file mode 100644 index 00000000..71bd5503 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryBandPriceStatesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_states", + "Type": "BandPriceState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryBandRelayersResponse.json b/source/json_tables/injective/oracle/QueryBandRelayersResponse.json new file mode 100644 index 00000000..5b1ce255 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryBandRelayersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryCoinbasePriceStatesResponse.json b/source/json_tables/injective/oracle/QueryCoinbasePriceStatesResponse.json new file mode 100644 index 00000000..1d787632 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryCoinbasePriceStatesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_states", + "Type": "CoinbasePriceState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryHistoricalPriceRecordsRequest.json b/source/json_tables/injective/oracle/QueryHistoricalPriceRecordsRequest.json new file mode 100644 index 00000000..f1e8c4c0 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryHistoricalPriceRecordsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "oracle", + "Type": "OracleType", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "symbol_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/QueryHistoricalPriceRecordsResponse.json b/source/json_tables/injective/oracle/QueryHistoricalPriceRecordsResponse.json new file mode 100644 index 00000000..0934cf2d --- /dev/null +++ b/source/json_tables/injective/oracle/QueryHistoricalPriceRecordsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_records", + "Type": "PriceRecords array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryModuleStateResponse.json b/source/json_tables/injective/oracle/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryOraclePriceRequest.json b/source/json_tables/injective/oracle/QueryOraclePriceRequest.json new file mode 100644 index 00000000..57dfd0d5 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryOraclePriceRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "oracle_type", + "Type": "OracleType", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "base", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "quote", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "scaling_options", + "Type": "ScalingOptions", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/oracle/QueryOraclePriceResponse.json b/source/json_tables/injective/oracle/QueryOraclePriceResponse.json new file mode 100644 index 00000000..9fbcb5f7 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryOraclePriceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_pair_state", + "Type": "PricePairState", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryOracleProviderPricesRequest.json b/source/json_tables/injective/oracle/QueryOracleProviderPricesRequest.json new file mode 100644 index 00000000..0a992a6d --- /dev/null +++ b/source/json_tables/injective/oracle/QueryOracleProviderPricesRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "provider", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/QueryOracleProviderPricesResponse.json b/source/json_tables/injective/oracle/QueryOracleProviderPricesResponse.json new file mode 100644 index 00000000..26d497a6 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryOracleProviderPricesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "providerState", + "Type": "ProviderState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryOracleProvidersInfoResponse.json b/source/json_tables/injective/oracle/QueryOracleProvidersInfoResponse.json new file mode 100644 index 00000000..3f3e55cb --- /dev/null +++ b/source/json_tables/injective/oracle/QueryOracleProvidersInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "providers", + "Type": "ProviderInfo array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryOracleVolatilityRequest.json b/source/json_tables/injective/oracle/QueryOracleVolatilityRequest.json new file mode 100644 index 00000000..510c0577 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryOracleVolatilityRequest.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "base_info", + "Type": "OracleInfo", + "Description": "", + "Required": "No" + }, + { + "Parameter": "quote_info", + "Type": "OracleInfo", + "Description": "", + "Required": "No" + }, + { + "Parameter": "oracle_history_options", + "Type": "OracleHistoryOptions", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/oracle/QueryOracleVolatilityResponse.json b/source/json_tables/injective/oracle/QueryOracleVolatilityResponse.json new file mode 100644 index 00000000..48a93e38 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryOracleVolatilityResponse.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "volatility", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "history_metadata", + "Type": "MetadataStatistics", + "Description": "" + }, + { + "Parameter": "raw_history", + "Type": "PriceRecord array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryParamsResponse.json b/source/json_tables/injective/oracle/QueryParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryPriceFeedPriceStatesResponse.json b/source/json_tables/injective/oracle/QueryPriceFeedPriceStatesResponse.json new file mode 100644 index 00000000..a3cddc71 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryPriceFeedPriceStatesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_states", + "Type": "PriceFeedState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryProviderPriceStateRequest.json b/source/json_tables/injective/oracle/QueryProviderPriceStateRequest.json new file mode 100644 index 00000000..5eb05863 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryProviderPriceStateRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "provider", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/QueryProviderPriceStateResponse.json b/source/json_tables/injective/oracle/QueryProviderPriceStateResponse.json new file mode 100644 index 00000000..b03fe842 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryProviderPriceStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryPythPriceRequest.json b/source/json_tables/injective/oracle/QueryPythPriceRequest.json new file mode 100644 index 00000000..112b446d --- /dev/null +++ b/source/json_tables/injective/oracle/QueryPythPriceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "price_id", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/QueryPythPriceResponse.json b/source/json_tables/injective/oracle/QueryPythPriceResponse.json new file mode 100644 index 00000000..3b2a4a0f --- /dev/null +++ b/source/json_tables/injective/oracle/QueryPythPriceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_state", + "Type": "PythPriceState", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryPythPriceStatesResponse.json b/source/json_tables/injective/oracle/QueryPythPriceStatesResponse.json new file mode 100644 index 00000000..1da7dab8 --- /dev/null +++ b/source/json_tables/injective/oracle/QueryPythPriceStatesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_states", + "Type": "PythPriceState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryStorkPriceStatesResponse.json b/source/json_tables/injective/oracle/QueryStorkPriceStatesResponse.json new file mode 100644 index 00000000..74e0d61f --- /dev/null +++ b/source/json_tables/injective/oracle/QueryStorkPriceStatesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_states", + "Type": "StorkPriceState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QueryStorkPublishersResponse.json b/source/json_tables/injective/oracle/QueryStorkPublishersResponse.json new file mode 100644 index 00000000..b3d8e4cb --- /dev/null +++ b/source/json_tables/injective/oracle/QueryStorkPublishersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "publishers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/RevokeBandOraclePrivilegeProposal.json b/source/json_tables/injective/oracle/RevokeBandOraclePrivilegeProposal.json new file mode 100644 index 00000000..5717b0ed --- /dev/null +++ b/source/json_tables/injective/oracle/RevokeBandOraclePrivilegeProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/RevokePriceFeederPrivilegeProposal.json b/source/json_tables/injective/oracle/RevokePriceFeederPrivilegeProposal.json new file mode 100644 index 00000000..75614580 --- /dev/null +++ b/source/json_tables/injective/oracle/RevokePriceFeederPrivilegeProposal.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "base", + "Type": "string", + "Description": "" + }, + { + "Parameter": "quote", + "Type": "string", + "Description": "" + }, + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/RevokeProviderPrivilegeProposal.json b/source/json_tables/injective/oracle/RevokeProviderPrivilegeProposal.json new file mode 100644 index 00000000..c93db247 --- /dev/null +++ b/source/json_tables/injective/oracle/RevokeProviderPrivilegeProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "provider", + "Type": "string", + "Description": "" + }, + { + "Parameter": "relayers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/RevokeStorkPublisherPrivilegeProposal.json b/source/json_tables/injective/oracle/RevokeStorkPublisherPrivilegeProposal.json new file mode 100644 index 00000000..25d1775f --- /dev/null +++ b/source/json_tables/injective/oracle/RevokeStorkPublisherPrivilegeProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "stork_publishers", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/ScalingOptions.json b/source/json_tables/injective/oracle/ScalingOptions.json new file mode 100644 index 00000000..cb7722ed --- /dev/null +++ b/source/json_tables/injective/oracle/ScalingOptions.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "base_decimals", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "quote_decimals", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/SetBandIBCPriceEvent.json b/source/json_tables/injective/oracle/SetBandIBCPriceEvent.json new file mode 100644 index 00000000..0c881873 --- /dev/null +++ b/source/json_tables/injective/oracle/SetBandIBCPriceEvent.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "relayer", + "Type": "string", + "Description": "" + }, + { + "Parameter": "symbols", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "prices", + "Type": "cosmossdk_io_math.LegacyDec array", + "Description": "" + }, + { + "Parameter": "resolve_time", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "request_id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "client_id", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/SetBandPriceEvent.json b/source/json_tables/injective/oracle/SetBandPriceEvent.json new file mode 100644 index 00000000..27b4fb13 --- /dev/null +++ b/source/json_tables/injective/oracle/SetBandPriceEvent.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "relayer", + "Type": "string", + "Description": "" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "resolve_time", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "request_id", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/SetChainlinkPriceEvent.json b/source/json_tables/injective/oracle/SetChainlinkPriceEvent.json new file mode 100644 index 00000000..da5bfb91 --- /dev/null +++ b/source/json_tables/injective/oracle/SetChainlinkPriceEvent.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "answer", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/SetCoinbasePriceEvent.json b/source/json_tables/injective/oracle/SetCoinbasePriceEvent.json new file mode 100644 index 00000000..22550b54 --- /dev/null +++ b/source/json_tables/injective/oracle/SetCoinbasePriceEvent.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/SetPriceFeedPriceEvent.json b/source/json_tables/injective/oracle/SetPriceFeedPriceEvent.json new file mode 100644 index 00000000..b3407b06 --- /dev/null +++ b/source/json_tables/injective/oracle/SetPriceFeedPriceEvent.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "relayer", + "Type": "string", + "Description": "" + }, + { + "Parameter": "base", + "Type": "string", + "Description": "" + }, + { + "Parameter": "quote", + "Type": "string", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "price defines the price of the oracle base and quote" + } +] diff --git a/source/json_tables/injective/oracle/SetProviderPriceEvent.json b/source/json_tables/injective/oracle/SetProviderPriceEvent.json new file mode 100644 index 00000000..d967b5f9 --- /dev/null +++ b/source/json_tables/injective/oracle/SetProviderPriceEvent.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "provider", + "Type": "string", + "Description": "" + }, + { + "Parameter": "relayer", + "Type": "string", + "Description": "" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/SignedPriceOfAssetPair.json b/source/json_tables/injective/oracle/SignedPriceOfAssetPair.json new file mode 100644 index 00000000..1d720515 --- /dev/null +++ b/source/json_tables/injective/oracle/SignedPriceOfAssetPair.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "publisher_key", + "Type": "string", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "signature", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/StorkPriceState.json b/source/json_tables/injective/oracle/StorkPriceState.json new file mode 100644 index 00000000..aeaede1a --- /dev/null +++ b/source/json_tables/injective/oracle/StorkPriceState.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "timestamp", + "Type": "uint64", + "Description": "timestamp of the when the price was signed by stork" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "the symbol of the price, e.g. BTC" + }, + { + "Parameter": "value", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the value of the price scaled by 1e18" + }, + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "the price state" + } +] diff --git a/source/json_tables/injective/oracle/SymbolPriceTimestamp.json b/source/json_tables/injective/oracle/SymbolPriceTimestamp.json new file mode 100644 index 00000000..a0cd95e5 --- /dev/null +++ b/source/json_tables/injective/oracle/SymbolPriceTimestamp.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "oracle", + "Type": "OracleType", + "Description": "" + }, + { + "Parameter": "symbol_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "timestamp", + "Type": "int64", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/UpdateBandOracleRequestProposal.json b/source/json_tables/injective/oracle/UpdateBandOracleRequestProposal.json new file mode 100644 index 00000000..507901f7 --- /dev/null +++ b/source/json_tables/injective/oracle/UpdateBandOracleRequestProposal.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "delete_request_ids", + "Type": "uint64 array", + "Description": "" + }, + { + "Parameter": "update_oracle_request", + "Type": "BandOracleRequest", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/v1beta1/OracleType.json b/source/json_tables/injective/oracle/v1beta1/OracleType.json new file mode 100644 index 00000000..08121931 --- /dev/null +++ b/source/json_tables/injective/oracle/v1beta1/OracleType.json @@ -0,0 +1,54 @@ +[ + { + "Code": "0", + "Name": "Unspecified" + }, + { + "Code": "1", + "Name": "Band" + }, + { + "Code": "2", + "Name": "PriceFeed" + }, + { + "Code": "3", + "Name": "Coinbase" + }, + { + "Code": "4", + "Name": "Chainlink" + }, + { + "Code": "5", + "Name": "Razor" + }, + { + "Code": "6", + "Name": "Dia" + }, + { + "Code": "7", + "Name": "API3" + }, + { + "Code": "8", + "Name": "Uma" + }, + { + "Code": "9", + "Name": "Pyth" + }, + { + "Code": "10", + "Name": "BandIBC" + }, + { + "Code": "11", + "Name": "Provider" + }, + { + "Code": "12", + "Name": "Stork" + } +] diff --git a/source/json_tables/injective/peggy/Attestation.json b/source/json_tables/injective/peggy/Attestation.json new file mode 100644 index 00000000..daf06fa0 --- /dev/null +++ b/source/json_tables/injective/peggy/Attestation.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "observed", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "votes", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "claim", + "Type": "types.Any", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/BatchFees.json b/source/json_tables/injective/peggy/BatchFees.json new file mode 100644 index 00000000..f7be8eae --- /dev/null +++ b/source/json_tables/injective/peggy/BatchFees.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "token", + "Type": "string", + "Description": "" + }, + { + "Parameter": "total_fees", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/BridgeValidator.json b/source/json_tables/injective/peggy/BridgeValidator.json new file mode 100644 index 00000000..7cf1bbb4 --- /dev/null +++ b/source/json_tables/injective/peggy/BridgeValidator.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "power", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "ethereum_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/ERC20ToDenom.json b/source/json_tables/injective/peggy/ERC20ToDenom.json new file mode 100644 index 00000000..7e5e86af --- /dev/null +++ b/source/json_tables/injective/peggy/ERC20ToDenom.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "erc20", + "Type": "string", + "Description": "" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/ERC20Token.json b/source/json_tables/injective/peggy/ERC20Token.json new file mode 100644 index 00000000..db5b2a15 --- /dev/null +++ b/source/json_tables/injective/peggy/ERC20Token.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "contract", + "Type": "string", + "Description": "" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/GenesisState.json b/source/json_tables/injective/peggy/GenesisState.json new file mode 100644 index 00000000..3aa678e5 --- /dev/null +++ b/source/json_tables/injective/peggy/GenesisState.json @@ -0,0 +1,77 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + }, + { + "Parameter": "last_observed_nonce", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "valsets", + "Type": "Valset array", + "Description": "" + }, + { + "Parameter": "valset_confirms", + "Type": "MsgValsetConfirm array", + "Description": "" + }, + { + "Parameter": "batches", + "Type": "OutgoingTxBatch array", + "Description": "" + }, + { + "Parameter": "batch_confirms", + "Type": "MsgConfirmBatch array", + "Description": "" + }, + { + "Parameter": "attestations", + "Type": "Attestation array", + "Description": "" + }, + { + "Parameter": "orchestrator_addresses", + "Type": "MsgSetOrchestratorAddresses array", + "Description": "" + }, + { + "Parameter": "erc20_to_denoms", + "Type": "ERC20ToDenom array", + "Description": "" + }, + { + "Parameter": "unbatched_transfers", + "Type": "OutgoingTransferTx array", + "Description": "" + }, + { + "Parameter": "last_observed_ethereum_height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "last_outgoing_batch_id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "last_outgoing_pool_id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "last_observed_valset", + "Type": "Valset", + "Description": "" + }, + { + "Parameter": "ethereum_blacklist", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/IDSet.json b/source/json_tables/injective/peggy/IDSet.json new file mode 100644 index 00000000..8223b16d --- /dev/null +++ b/source/json_tables/injective/peggy/IDSet.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "ids", + "Type": "uint64 array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/LastClaimEvent.json b/source/json_tables/injective/peggy/LastClaimEvent.json new file mode 100644 index 00000000..75f796e4 --- /dev/null +++ b/source/json_tables/injective/peggy/LastClaimEvent.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "ethereum_event_nonce", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "ethereum_event_height", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/LastObservedEthereumBlockHeight.json b/source/json_tables/injective/peggy/LastObservedEthereumBlockHeight.json new file mode 100644 index 00000000..134827ab --- /dev/null +++ b/source/json_tables/injective/peggy/LastObservedEthereumBlockHeight.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "cosmos_block_height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "ethereum_block_height", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/MissingNoncesResponse.json b/source/json_tables/injective/peggy/MissingNoncesResponse.json new file mode 100644 index 00000000..63bc6f01 --- /dev/null +++ b/source/json_tables/injective/peggy/MissingNoncesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "operator_addresses", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/MsgBlacklistEthereumAddresses.json b/source/json_tables/injective/peggy/MsgBlacklistEthereumAddresses.json new file mode 100644 index 00000000..2f006f38 --- /dev/null +++ b/source/json_tables/injective/peggy/MsgBlacklistEthereumAddresses.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "signer", + "Type": "string", + "Description": "signer address", + "Required": "Yes" + }, + { + "Parameter": "blacklist_addresses", + "Type": "string array", + "Description": "Ethereum addresses to include in the blacklist", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgCancelSendToEth.json b/source/json_tables/injective/peggy/MsgCancelSendToEth.json new file mode 100644 index 00000000..ed2af635 --- /dev/null +++ b/source/json_tables/injective/peggy/MsgCancelSendToEth.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "transaction_id", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgConfirmBatch.json b/source/json_tables/injective/peggy/MsgConfirmBatch.json new file mode 100644 index 00000000..aa7bb486 --- /dev/null +++ b/source/json_tables/injective/peggy/MsgConfirmBatch.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token_contract", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "eth_signer", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orchestrator", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "signature", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgDepositClaim.json b/source/json_tables/injective/peggy/MsgDepositClaim.json new file mode 100644 index 00000000..8ffec1bd --- /dev/null +++ b/source/json_tables/injective/peggy/MsgDepositClaim.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "event_nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "block_height", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token_contract", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "ethereum_sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "cosmos_receiver", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orchestrator", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "data", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgERC20DeployedClaim.json b/source/json_tables/injective/peggy/MsgERC20DeployedClaim.json new file mode 100644 index 00000000..5081128b --- /dev/null +++ b/source/json_tables/injective/peggy/MsgERC20DeployedClaim.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "event_nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "block_height", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "cosmos_denom", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token_contract", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "name", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "decimals", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orchestrator", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgRequestBatch.json b/source/json_tables/injective/peggy/MsgRequestBatch.json new file mode 100644 index 00000000..92235dc3 --- /dev/null +++ b/source/json_tables/injective/peggy/MsgRequestBatch.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "orchestrator", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgRevokeEthereumBlacklist.json b/source/json_tables/injective/peggy/MsgRevokeEthereumBlacklist.json new file mode 100644 index 00000000..2f006f38 --- /dev/null +++ b/source/json_tables/injective/peggy/MsgRevokeEthereumBlacklist.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "signer", + "Type": "string", + "Description": "signer address", + "Required": "Yes" + }, + { + "Parameter": "blacklist_addresses", + "Type": "string array", + "Description": "Ethereum addresses to include in the blacklist", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgSendToEth.json b/source/json_tables/injective/peggy/MsgSendToEth.json new file mode 100644 index 00000000..20c4f19c --- /dev/null +++ b/source/json_tables/injective/peggy/MsgSendToEth.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "eth_dest", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "bridge_fee", + "Type": "types.Coin", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgSetOrchestratorAddresses.json b/source/json_tables/injective/peggy/MsgSetOrchestratorAddresses.json new file mode 100644 index 00000000..30511e5f --- /dev/null +++ b/source/json_tables/injective/peggy/MsgSetOrchestratorAddresses.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orchestrator", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "eth_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgSubmitBadSignatureEvidence.json b/source/json_tables/injective/peggy/MsgSubmitBadSignatureEvidence.json new file mode 100644 index 00000000..b200a492 --- /dev/null +++ b/source/json_tables/injective/peggy/MsgSubmitBadSignatureEvidence.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "subject", + "Type": "types1.Any", + "Description": "", + "Required": "No" + }, + { + "Parameter": "signature", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgUpdateParams.json b/source/json_tables/injective/peggy/MsgUpdateParams.json new file mode 100644 index 00000000..fac6595b --- /dev/null +++ b/source/json_tables/injective/peggy/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the peggy parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgValsetConfirm.json b/source/json_tables/injective/peggy/MsgValsetConfirm.json new file mode 100644 index 00000000..17852936 --- /dev/null +++ b/source/json_tables/injective/peggy/MsgValsetConfirm.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orchestrator", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "eth_address", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "signature", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgValsetUpdatedClaim.json b/source/json_tables/injective/peggy/MsgValsetUpdatedClaim.json new file mode 100644 index 00000000..6f2c6c6f --- /dev/null +++ b/source/json_tables/injective/peggy/MsgValsetUpdatedClaim.json @@ -0,0 +1,44 @@ +[ + { + "Parameter": "event_nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "valset_nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "block_height", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "members", + "Type": "BridgeValidator array", + "Description": "", + "Required": "No" + }, + { + "Parameter": "reward_amount", + "Type": "cosmossdk_io_math.Int", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "reward_token", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orchestrator", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/MsgWithdrawClaim.json b/source/json_tables/injective/peggy/MsgWithdrawClaim.json new file mode 100644 index 00000000..7b5c5b46 --- /dev/null +++ b/source/json_tables/injective/peggy/MsgWithdrawClaim.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "event_nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "block_height", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "batch_nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "token_contract", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "orchestrator", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/OutgoingTransferTx.json b/source/json_tables/injective/peggy/OutgoingTransferTx.json new file mode 100644 index 00000000..692d3d4b --- /dev/null +++ b/source/json_tables/injective/peggy/OutgoingTransferTx.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "sender", + "Type": "string", + "Description": "" + }, + { + "Parameter": "dest_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "erc20_token", + "Type": "ERC20Token", + "Description": "" + }, + { + "Parameter": "erc20_fee", + "Type": "ERC20Token", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/OutgoingTxBatch.json b/source/json_tables/injective/peggy/OutgoingTxBatch.json new file mode 100644 index 00000000..889cab11 --- /dev/null +++ b/source/json_tables/injective/peggy/OutgoingTxBatch.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "batch_nonce", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "batch_timeout", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "transactions", + "Type": "OutgoingTransferTx array", + "Description": "" + }, + { + "Parameter": "token_contract", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/Params.json b/source/json_tables/injective/peggy/Params.json new file mode 100644 index 00000000..2e98c211 --- /dev/null +++ b/source/json_tables/injective/peggy/Params.json @@ -0,0 +1,117 @@ +[ + { + "Parameter": "peggy_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "contract_source_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "bridge_ethereum_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "bridge_chain_id", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "signed_valsets_window", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "signed_batches_window", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "signed_claims_window", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "target_batch_timeout", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "average_block_time", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "average_ethereum_block_time", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "slash_fraction_valset", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "slash_fraction_batch", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "slash_fraction_claim", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "slash_fraction_conflicting_claim", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "unbond_slashing_valsets_window", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "slash_fraction_bad_eth_signature", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "cosmos_coin_denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cosmos_coin_erc20_contract", + "Type": "string", + "Description": "" + }, + { + "Parameter": "claim_slashing_enabled", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "bridge_contract_start_height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "valset_reward", + "Type": "types.Coin", + "Description": "" + }, + { + "Parameter": "admins", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "segregated_wallet_address", + "Type": "string", + "Description": "address for receiving Peggy Deposits from sanctioned Ethereum addresses" + } +] diff --git a/source/json_tables/injective/peggy/QueryBatchConfirmsRequest.json b/source/json_tables/injective/peggy/QueryBatchConfirmsRequest.json new file mode 100644 index 00000000..39a39a42 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryBatchConfirmsRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryBatchConfirmsResponse.json b/source/json_tables/injective/peggy/QueryBatchConfirmsResponse.json new file mode 100644 index 00000000..e2cf87a3 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryBatchConfirmsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "confirms", + "Type": "MsgConfirmBatch array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryBatchFeeResponse.json b/source/json_tables/injective/peggy/QueryBatchFeeResponse.json new file mode 100644 index 00000000..329c4a89 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryBatchFeeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "batchFees", + "Type": "BatchFees array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryBatchRequestByNonceRequest.json b/source/json_tables/injective/peggy/QueryBatchRequestByNonceRequest.json new file mode 100644 index 00000000..39a39a42 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryBatchRequestByNonceRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryBatchRequestByNonceResponse.json b/source/json_tables/injective/peggy/QueryBatchRequestByNonceResponse.json new file mode 100644 index 00000000..a2f8a724 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryBatchRequestByNonceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "batch", + "Type": "OutgoingTxBatch", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryCurrentValsetResponse.json b/source/json_tables/injective/peggy/QueryCurrentValsetResponse.json new file mode 100644 index 00000000..2ff4e75d --- /dev/null +++ b/source/json_tables/injective/peggy/QueryCurrentValsetResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "valset", + "Type": "Valset", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryDelegateKeysByEthAddress.json b/source/json_tables/injective/peggy/QueryDelegateKeysByEthAddress.json new file mode 100644 index 00000000..dbb729f7 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryDelegateKeysByEthAddress.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "eth_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryDelegateKeysByEthAddressResponse.json b/source/json_tables/injective/peggy/QueryDelegateKeysByEthAddressResponse.json new file mode 100644 index 00000000..7e2173d4 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryDelegateKeysByEthAddressResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "orchestrator_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryDelegateKeysByOrchestratorAddress.json b/source/json_tables/injective/peggy/QueryDelegateKeysByOrchestratorAddress.json new file mode 100644 index 00000000..e0a08d4f --- /dev/null +++ b/source/json_tables/injective/peggy/QueryDelegateKeysByOrchestratorAddress.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "orchestrator_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryDelegateKeysByOrchestratorAddressResponse.json b/source/json_tables/injective/peggy/QueryDelegateKeysByOrchestratorAddressResponse.json new file mode 100644 index 00000000..fd7ae520 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryDelegateKeysByOrchestratorAddressResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "eth_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryDelegateKeysByValidatorAddress.json b/source/json_tables/injective/peggy/QueryDelegateKeysByValidatorAddress.json new file mode 100644 index 00000000..d3fd57f9 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryDelegateKeysByValidatorAddress.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "validator_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryDelegateKeysByValidatorAddressResponse.json b/source/json_tables/injective/peggy/QueryDelegateKeysByValidatorAddressResponse.json new file mode 100644 index 00000000..61efe5f4 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryDelegateKeysByValidatorAddressResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "eth_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "orchestrator_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryDenomToERC20Request.json b/source/json_tables/injective/peggy/QueryDenomToERC20Request.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryDenomToERC20Request.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryDenomToERC20Response.json b/source/json_tables/injective/peggy/QueryDenomToERC20Response.json new file mode 100644 index 00000000..ea253b67 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryDenomToERC20Response.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "erc20", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cosmos_originated", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryERC20ToDenomRequest.json b/source/json_tables/injective/peggy/QueryERC20ToDenomRequest.json new file mode 100644 index 00000000..d8f13c87 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryERC20ToDenomRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "erc20", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryERC20ToDenomResponse.json b/source/json_tables/injective/peggy/QueryERC20ToDenomResponse.json new file mode 100644 index 00000000..8cc0283e --- /dev/null +++ b/source/json_tables/injective/peggy/QueryERC20ToDenomResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cosmos_originated", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryLastEventByAddrRequest.json b/source/json_tables/injective/peggy/QueryLastEventByAddrRequest.json new file mode 100644 index 00000000..4b3e99c1 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryLastEventByAddrRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryLastEventByAddrResponse.json b/source/json_tables/injective/peggy/QueryLastEventByAddrResponse.json new file mode 100644 index 00000000..04d9c261 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryLastEventByAddrResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "last_claim_event", + "Type": "LastClaimEvent", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryLastPendingBatchRequestByAddrRequest.json b/source/json_tables/injective/peggy/QueryLastPendingBatchRequestByAddrRequest.json new file mode 100644 index 00000000..4b3e99c1 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryLastPendingBatchRequestByAddrRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryLastPendingBatchRequestByAddrResponse.json b/source/json_tables/injective/peggy/QueryLastPendingBatchRequestByAddrResponse.json new file mode 100644 index 00000000..a2f8a724 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryLastPendingBatchRequestByAddrResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "batch", + "Type": "OutgoingTxBatch", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryLastPendingValsetRequestByAddrRequest.json b/source/json_tables/injective/peggy/QueryLastPendingValsetRequestByAddrRequest.json new file mode 100644 index 00000000..4b3e99c1 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryLastPendingValsetRequestByAddrRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryLastPendingValsetRequestByAddrResponse.json b/source/json_tables/injective/peggy/QueryLastPendingValsetRequestByAddrResponse.json new file mode 100644 index 00000000..c439e58b --- /dev/null +++ b/source/json_tables/injective/peggy/QueryLastPendingValsetRequestByAddrResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "valsets", + "Type": "Valset array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryLastValsetRequestsResponse.json b/source/json_tables/injective/peggy/QueryLastValsetRequestsResponse.json new file mode 100644 index 00000000..c439e58b --- /dev/null +++ b/source/json_tables/injective/peggy/QueryLastValsetRequestsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "valsets", + "Type": "Valset array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryModuleStateResponse.json b/source/json_tables/injective/peggy/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryOutgoingTxBatchesResponse.json b/source/json_tables/injective/peggy/QueryOutgoingTxBatchesResponse.json new file mode 100644 index 00000000..71b2d16a --- /dev/null +++ b/source/json_tables/injective/peggy/QueryOutgoingTxBatchesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "batches", + "Type": "OutgoingTxBatch array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryParamsResponse.json b/source/json_tables/injective/peggy/QueryParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryPendingSendToEth.json b/source/json_tables/injective/peggy/QueryPendingSendToEth.json new file mode 100644 index 00000000..680df406 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryPendingSendToEth.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "sender_address", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryPendingSendToEthResponse.json b/source/json_tables/injective/peggy/QueryPendingSendToEthResponse.json new file mode 100644 index 00000000..13d88227 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryPendingSendToEthResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "transfers_in_batches", + "Type": "OutgoingTransferTx array", + "Description": "" + }, + { + "Parameter": "unbatched_transfers", + "Type": "OutgoingTransferTx array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryValsetConfirmRequest.json b/source/json_tables/injective/peggy/QueryValsetConfirmRequest.json new file mode 100644 index 00000000..7692ac8c --- /dev/null +++ b/source/json_tables/injective/peggy/QueryValsetConfirmRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryValsetConfirmResponse.json b/source/json_tables/injective/peggy/QueryValsetConfirmResponse.json new file mode 100644 index 00000000..d8030b56 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryValsetConfirmResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "confirm", + "Type": "MsgValsetConfirm", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryValsetConfirmsByNonceRequest.json b/source/json_tables/injective/peggy/QueryValsetConfirmsByNonceRequest.json new file mode 100644 index 00000000..3dba5a89 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryValsetConfirmsByNonceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryValsetConfirmsByNonceResponse.json b/source/json_tables/injective/peggy/QueryValsetConfirmsByNonceResponse.json new file mode 100644 index 00000000..c1ea4dcf --- /dev/null +++ b/source/json_tables/injective/peggy/QueryValsetConfirmsByNonceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "confirms", + "Type": "MsgValsetConfirm array", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/QueryValsetRequestRequest.json b/source/json_tables/injective/peggy/QueryValsetRequestRequest.json new file mode 100644 index 00000000..3dba5a89 --- /dev/null +++ b/source/json_tables/injective/peggy/QueryValsetRequestRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/peggy/QueryValsetRequestResponse.json b/source/json_tables/injective/peggy/QueryValsetRequestResponse.json new file mode 100644 index 00000000..2ff4e75d --- /dev/null +++ b/source/json_tables/injective/peggy/QueryValsetRequestResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "valset", + "Type": "Valset", + "Description": "" + } +] diff --git a/source/json_tables/injective/peggy/Valset.json b/source/json_tables/injective/peggy/Valset.json new file mode 100644 index 00000000..a73e47b4 --- /dev/null +++ b/source/json_tables/injective/peggy/Valset.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "nonce", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "members", + "Type": "BridgeValidator array", + "Description": "" + }, + { + "Parameter": "height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "reward_amount", + "Type": "cosmossdk_io_math.Int", + "Description": "" + }, + { + "Parameter": "reward_token", + "Type": "string", + "Description": "the reward token in it's Ethereum hex address representation" + } +] diff --git a/source/json_tables/injective/peggy/Withdrawal.json b/source/json_tables/injective/peggy/Withdrawal.json new file mode 100644 index 00000000..8e7ba8b7 --- /dev/null +++ b/source/json_tables/injective/peggy/Withdrawal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Injective sender address" + }, + { + "Parameter": "receiver", + "Type": "string", + "Description": "Ethereum receiver address" + }, + { + "Parameter": "amount", + "Type": "cosmossdk_io_math.Int", + "Description": "Amount of tokens withdrawn to Ethereum" + } +] diff --git a/source/json_tables/injective/peggy/v1/ClaimType.json b/source/json_tables/injective/peggy/v1/ClaimType.json new file mode 100644 index 00000000..5b6265fb --- /dev/null +++ b/source/json_tables/injective/peggy/v1/ClaimType.json @@ -0,0 +1,22 @@ +[ + { + "Code": "0", + "Name": "CLAIM_TYPE_UNKNOWN" + }, + { + "Code": "1", + "Name": "CLAIM_TYPE_DEPOSIT" + }, + { + "Code": "2", + "Name": "CLAIM_TYPE_WITHDRAW" + }, + { + "Code": "3", + "Name": "CLAIM_TYPE_ERC20_DEPLOYED" + }, + { + "Code": "4", + "Name": "CLAIM_TYPE_VALSET_UPDATED" + } +] diff --git a/source/json_tables/injective/peggy/v1/SignType.json b/source/json_tables/injective/peggy/v1/SignType.json new file mode 100644 index 00000000..e273f4ee --- /dev/null +++ b/source/json_tables/injective/peggy/v1/SignType.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "SIGN_TYPE_UNKNOWN" + }, + { + "Code": "1", + "Name": "SIGN_TYPE_ORCHESTRATOR_SIGNED_MULTI_SIG_UPDATE" + }, + { + "Code": "2", + "Name": "SIGN_TYPE_ORCHESTRATOR_SIGNED_WITHDRAW_BATCH" + } +] diff --git a/source/json_tables/injective/permissions/ActorRoles.json b/source/json_tables/injective/permissions/ActorRoles.json new file mode 100644 index 00000000..b30332d2 --- /dev/null +++ b/source/json_tables/injective/permissions/ActorRoles.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "actor", + "Type": "string", + "Description": "" + }, + { + "Parameter": "roles", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/AddressVoucher.json b/source/json_tables/injective/permissions/AddressVoucher.json new file mode 100644 index 00000000..c8234883 --- /dev/null +++ b/source/json_tables/injective/permissions/AddressVoucher.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "voucher", + "Type": "github_com_cosmos_cosmos_sdk_types.Coin", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/GenesisState.json b/source/json_tables/injective/permissions/GenesisState.json new file mode 100644 index 00000000..d425ae22 --- /dev/null +++ b/source/json_tables/injective/permissions/GenesisState.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + }, + { + "Parameter": "namespaces", + "Type": "Namespace array", + "Description": "" + }, + { + "Parameter": "vouchers", + "Type": "AddressVoucher array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/MsgClaimVoucher.json b/source/json_tables/injective/permissions/MsgClaimVoucher.json new file mode 100644 index 00000000..15a84d2e --- /dev/null +++ b/source/json_tables/injective/permissions/MsgClaimVoucher.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/MsgCreateNamespace.json b/source/json_tables/injective/permissions/MsgCreateNamespace.json new file mode 100644 index 00000000..a075f258 --- /dev/null +++ b/source/json_tables/injective/permissions/MsgCreateNamespace.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "namespace", + "Type": "Namespace", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/MsgUpdateActorRoles.json b/source/json_tables/injective/permissions/MsgUpdateActorRoles.json new file mode 100644 index 00000000..1db58137 --- /dev/null +++ b/source/json_tables/injective/permissions/MsgUpdateActorRoles.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "role_actors_to_add", + "Type": "RoleActors array", + "Description": "", + "Required": "No" + }, + { + "Parameter": "role_actors_to_revoke", + "Type": "RoleActors array", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/injective/permissions/MsgUpdateNamespace.json b/source/json_tables/injective/permissions/MsgUpdateNamespace.json new file mode 100644 index 00000000..6eaeb979 --- /dev/null +++ b/source/json_tables/injective/permissions/MsgUpdateNamespace.json @@ -0,0 +1,50 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "contract_hook", + "Type": "MsgUpdateNamespace_SetContractHook", + "Description": "", + "Required": "No" + }, + { + "Parameter": "role_permissions", + "Type": "Role array", + "Description": "", + "Required": "No" + }, + { + "Parameter": "role_managers", + "Type": "RoleManager array", + "Description": "", + "Required": "No" + }, + { + "Parameter": "policy_statuses", + "Type": "PolicyStatus array", + "Description": "", + "Required": "No" + }, + { + "Parameter": "policy_manager_capabilities", + "Type": "PolicyManagerCapability array", + "Description": "", + "Required": "No" + }, + { + "Parameter": "new_value", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/MsgUpdateParams.json b/source/json_tables/injective/permissions/MsgUpdateParams.json new file mode 100644 index 00000000..70213fcc --- /dev/null +++ b/source/json_tables/injective/permissions/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the permissions parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/Namespace.json b/source/json_tables/injective/permissions/Namespace.json new file mode 100644 index 00000000..6b24430a --- /dev/null +++ b/source/json_tables/injective/permissions/Namespace.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "contract_hook", + "Type": "string", + "Description": "" + }, + { + "Parameter": "role_permissions", + "Type": "Role array", + "Description": "" + }, + { + "Parameter": "actor_roles", + "Type": "ActorRoles array", + "Description": "" + }, + { + "Parameter": "role_managers", + "Type": "RoleManager array", + "Description": "" + }, + { + "Parameter": "policy_statuses", + "Type": "PolicyStatus array", + "Description": "" + }, + { + "Parameter": "policy_manager_capabilities", + "Type": "PolicyManagerCapability array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/Params.json b/source/json_tables/injective/permissions/Params.json new file mode 100644 index 00000000..f636e989 --- /dev/null +++ b/source/json_tables/injective/permissions/Params.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "wasm_hook_query_max_gas", + "Type": "uint64", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/PolicyManagerCapability.json b/source/json_tables/injective/permissions/PolicyManagerCapability.json new file mode 100644 index 00000000..cc6edc66 --- /dev/null +++ b/source/json_tables/injective/permissions/PolicyManagerCapability.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "manager", + "Type": "string", + "Description": "" + }, + { + "Parameter": "action", + "Type": "Action", + "Description": "" + }, + { + "Parameter": "can_disable", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "can_seal", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/PolicyStatus.json b/source/json_tables/injective/permissions/PolicyStatus.json new file mode 100644 index 00000000..ceff9d31 --- /dev/null +++ b/source/json_tables/injective/permissions/PolicyStatus.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "action", + "Type": "Action", + "Description": "" + }, + { + "Parameter": "is_disabled", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "is_sealed", + "Type": "bool", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryActorsByRoleRequest.json b/source/json_tables/injective/permissions/QueryActorsByRoleRequest.json new file mode 100644 index 00000000..d505879c --- /dev/null +++ b/source/json_tables/injective/permissions/QueryActorsByRoleRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "role", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryActorsByRoleResponse.json b/source/json_tables/injective/permissions/QueryActorsByRoleResponse.json new file mode 100644 index 00000000..82ff32fe --- /dev/null +++ b/source/json_tables/injective/permissions/QueryActorsByRoleResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "actors", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryModuleStateResponse.json b/source/json_tables/injective/permissions/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryNamespaceDenomsResponse.json b/source/json_tables/injective/permissions/QueryNamespaceDenomsResponse.json new file mode 100644 index 00000000..ad26b14d --- /dev/null +++ b/source/json_tables/injective/permissions/QueryNamespaceDenomsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "denoms", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryNamespaceRequest.json b/source/json_tables/injective/permissions/QueryNamespaceRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryNamespaceRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryNamespaceResponse.json b/source/json_tables/injective/permissions/QueryNamespaceResponse.json new file mode 100644 index 00000000..cca0298a --- /dev/null +++ b/source/json_tables/injective/permissions/QueryNamespaceResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "namespace", + "Type": "Namespace", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryNamespacesResponse.json b/source/json_tables/injective/permissions/QueryNamespacesResponse.json new file mode 100644 index 00000000..83f7710c --- /dev/null +++ b/source/json_tables/injective/permissions/QueryNamespacesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "namespaces", + "Type": "Namespace array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryParamsResponse.json b/source/json_tables/injective/permissions/QueryParamsResponse.json new file mode 100644 index 00000000..27703560 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + } +] diff --git a/source/json_tables/injective/permissions/QueryPolicyManagerCapabilitiesRequest.json b/source/json_tables/injective/permissions/QueryPolicyManagerCapabilitiesRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryPolicyManagerCapabilitiesRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryPolicyManagerCapabilitiesResponse.json b/source/json_tables/injective/permissions/QueryPolicyManagerCapabilitiesResponse.json new file mode 100644 index 00000000..2436b9a4 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryPolicyManagerCapabilitiesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "policy_manager_capabilities", + "Type": "PolicyManagerCapability array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryPolicyStatusesRequest.json b/source/json_tables/injective/permissions/QueryPolicyStatusesRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryPolicyStatusesRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryPolicyStatusesResponse.json b/source/json_tables/injective/permissions/QueryPolicyStatusesResponse.json new file mode 100644 index 00000000..515c28fe --- /dev/null +++ b/source/json_tables/injective/permissions/QueryPolicyStatusesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "policy_statuses", + "Type": "PolicyStatus array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryRoleManagerRequest.json b/source/json_tables/injective/permissions/QueryRoleManagerRequest.json new file mode 100644 index 00000000..cc6f9fe3 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryRoleManagerRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "manager", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryRoleManagerResponse.json b/source/json_tables/injective/permissions/QueryRoleManagerResponse.json new file mode 100644 index 00000000..6b005e1e --- /dev/null +++ b/source/json_tables/injective/permissions/QueryRoleManagerResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "role_manager", + "Type": "RoleManager", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryRoleManagersRequest.json b/source/json_tables/injective/permissions/QueryRoleManagersRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryRoleManagersRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryRoleManagersResponse.json b/source/json_tables/injective/permissions/QueryRoleManagersResponse.json new file mode 100644 index 00000000..382ac109 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryRoleManagersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "role_managers", + "Type": "RoleManager array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryRolesByActorRequest.json b/source/json_tables/injective/permissions/QueryRolesByActorRequest.json new file mode 100644 index 00000000..f984000e --- /dev/null +++ b/source/json_tables/injective/permissions/QueryRolesByActorRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "actor", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryRolesByActorResponse.json b/source/json_tables/injective/permissions/QueryRolesByActorResponse.json new file mode 100644 index 00000000..c60b6fc0 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryRolesByActorResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "roles", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryVoucherRequest.json b/source/json_tables/injective/permissions/QueryVoucherRequest.json new file mode 100644 index 00000000..f96b137e --- /dev/null +++ b/source/json_tables/injective/permissions/QueryVoucherRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryVoucherResponse.json b/source/json_tables/injective/permissions/QueryVoucherResponse.json new file mode 100644 index 00000000..1c182cc5 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryVoucherResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "voucher", + "Type": "github_com_cosmos_cosmos_sdk_types.Coin", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/QueryVouchersRequest.json b/source/json_tables/injective/permissions/QueryVouchersRequest.json new file mode 100644 index 00000000..2f418605 --- /dev/null +++ b/source/json_tables/injective/permissions/QueryVouchersRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/permissions/QueryVouchersResponse.json b/source/json_tables/injective/permissions/QueryVouchersResponse.json new file mode 100644 index 00000000..96241c6c --- /dev/null +++ b/source/json_tables/injective/permissions/QueryVouchersResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "vouchers", + "Type": "AddressVoucher array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/Role.json b/source/json_tables/injective/permissions/Role.json new file mode 100644 index 00000000..b97125d7 --- /dev/null +++ b/source/json_tables/injective/permissions/Role.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "name", + "Type": "string", + "Description": "" + }, + { + "Parameter": "role_id", + "Type": "uint32", + "Description": "" + }, + { + "Parameter": "permissions", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/RoleActors.json b/source/json_tables/injective/permissions/RoleActors.json new file mode 100644 index 00000000..ae9b3e61 --- /dev/null +++ b/source/json_tables/injective/permissions/RoleActors.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "role", + "Type": "string", + "Description": "" + }, + { + "Parameter": "actors", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/RoleIDs.json b/source/json_tables/injective/permissions/RoleIDs.json new file mode 100644 index 00000000..9ddf1651 --- /dev/null +++ b/source/json_tables/injective/permissions/RoleIDs.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "role_ids", + "Type": "uint32 array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/RoleManager.json b/source/json_tables/injective/permissions/RoleManager.json new file mode 100644 index 00000000..6772ec84 --- /dev/null +++ b/source/json_tables/injective/permissions/RoleManager.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "manager", + "Type": "string", + "Description": "" + }, + { + "Parameter": "roles", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/permissions/v1beta1/Action.json b/source/json_tables/injective/permissions/v1beta1/Action.json new file mode 100644 index 00000000..f4562219 --- /dev/null +++ b/source/json_tables/injective/permissions/v1beta1/Action.json @@ -0,0 +1,42 @@ +[ + { + "Code": "0", + "Name": "UNSPECIFIED" + }, + { + "Code": "1", + "Name": "MINT" + }, + { + "Code": "2", + "Name": "RECEIVE" + }, + { + "Code": "4", + "Name": "BURN" + }, + { + "Code": "8", + "Name": "SEND" + }, + { + "Code": "16", + "Name": "SUPER_BURN" + }, + { + "Code": "0", + "Name": "MODIFY_POLICY_MANAGERS" + }, + { + "Code": "0", + "Name": "MODIFY_CONTRACT_HOOK" + }, + { + "Code": "0", + "Name": "MODIFY_ROLE_PERMISSIONS" + }, + { + "Code": "0", + "Name": "MODIFY_ROLE_MANAGERS" + } +] diff --git a/source/json_tables/injective/stream/BankBalance.json b/source/json_tables/injective/stream/BankBalance.json new file mode 100644 index 00000000..45e43635 --- /dev/null +++ b/source/json_tables/injective/stream/BankBalance.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "" + }, + { + "Parameter": "balances", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/BankBalancesFilter.json b/source/json_tables/injective/stream/BankBalancesFilter.json new file mode 100644 index 00000000..f2a19fc9 --- /dev/null +++ b/source/json_tables/injective/stream/BankBalancesFilter.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "accounts", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/DerivativeOrder.json b/source/json_tables/injective/stream/DerivativeOrder.json new file mode 100644 index 00000000..0318c358 --- /dev/null +++ b/source/json_tables/injective/stream/DerivativeOrder.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "order", + "Type": "types.DerivativeLimitOrder", + "Description": "the derivative order details" + }, + { + "Parameter": "is_market", + "Type": "bool", + "Description": "whether the order is a market order" + } +] diff --git a/source/json_tables/injective/stream/DerivativeOrderUpdate.json b/source/json_tables/injective/stream/DerivativeOrderUpdate.json new file mode 100644 index 00000000..38b1547f --- /dev/null +++ b/source/json_tables/injective/stream/DerivativeOrderUpdate.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "status", + "Type": "OrderUpdateStatus", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/DerivativeTrade.json b/source/json_tables/injective/stream/DerivativeTrade.json new file mode 100644 index 00000000..7d0965ce --- /dev/null +++ b/source/json_tables/injective/stream/DerivativeTrade.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "is_buy", + "Type": "bool", + "Description": "whether the trade is a buy or sell" + }, + { + "Parameter": "executionType", + "Type": "string", + "Description": "the execution type" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "position_delta", + "Type": "types.PositionDelta", + "Description": "the position delta of the trade" + }, + { + "Parameter": "payout", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the payout of the trade" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the fee of the trade" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "fee_recipient_address", + "Type": "string", + "Description": "the fee recipient address" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "the trade ID" + } +] diff --git a/source/json_tables/injective/stream/OraclePrice.json b/source/json_tables/injective/stream/OraclePrice.json new file mode 100644 index 00000000..cd69fd13 --- /dev/null +++ b/source/json_tables/injective/stream/OraclePrice.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/OraclePriceFilter.json b/source/json_tables/injective/stream/OraclePriceFilter.json new file mode 100644 index 00000000..c5b6789a --- /dev/null +++ b/source/json_tables/injective/stream/OraclePriceFilter.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "symbol", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/Orderbook.json b/source/json_tables/injective/stream/Orderbook.json new file mode 100644 index 00000000..7a86d44e --- /dev/null +++ b/source/json_tables/injective/stream/Orderbook.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "buy_levels", + "Type": "types.Level array", + "Description": "" + }, + { + "Parameter": "sell_levels", + "Type": "types.Level array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/OrderbookFilter.json b/source/json_tables/injective/stream/OrderbookFilter.json new file mode 100644 index 00000000..5ef29834 --- /dev/null +++ b/source/json_tables/injective/stream/OrderbookFilter.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/OrderbookUpdate.json b/source/json_tables/injective/stream/OrderbookUpdate.json new file mode 100644 index 00000000..cf5118cf --- /dev/null +++ b/source/json_tables/injective/stream/OrderbookUpdate.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "seq", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "orderbook", + "Type": "Orderbook", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/OrdersFilter.json b/source/json_tables/injective/stream/OrdersFilter.json new file mode 100644 index 00000000..a8f87975 --- /dev/null +++ b/source/json_tables/injective/stream/OrdersFilter.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/Position.json b/source/json_tables/injective/stream/Position.json new file mode 100644 index 00000000..d42e460f --- /dev/null +++ b/source/json_tables/injective/stream/Position.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "isLong", + "Type": "bool", + "Description": "whether the position is long or short" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the position" + }, + { + "Parameter": "entry_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the entry price of the position" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the margin of the position" + }, + { + "Parameter": "cumulative_funding_entry", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the cumulative funding entry of the position" + } +] diff --git a/source/json_tables/injective/stream/PositionsFilter.json b/source/json_tables/injective/stream/PositionsFilter.json new file mode 100644 index 00000000..a8f87975 --- /dev/null +++ b/source/json_tables/injective/stream/PositionsFilter.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/SpotOrder.json b/source/json_tables/injective/stream/SpotOrder.json new file mode 100644 index 00000000..fa575edd --- /dev/null +++ b/source/json_tables/injective/stream/SpotOrder.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "order", + "Type": "types.SpotLimitOrder", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/SpotOrderUpdate.json b/source/json_tables/injective/stream/SpotOrderUpdate.json new file mode 100644 index 00000000..e08241ac --- /dev/null +++ b/source/json_tables/injective/stream/SpotOrderUpdate.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "status", + "Type": "OrderUpdateStatus", + "Description": "" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "" + }, + { + "Parameter": "order", + "Type": "SpotOrder", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/SpotTrade.json b/source/json_tables/injective/stream/SpotTrade.json new file mode 100644 index 00000000..26bc6e65 --- /dev/null +++ b/source/json_tables/injective/stream/SpotTrade.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "is_buy", + "Type": "bool", + "Description": "whether the trade is a buy or sell" + }, + { + "Parameter": "executionType", + "Type": "string", + "Description": "the execution type" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the trade" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the price of the trade" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID that executed the trade" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the fee of the trade" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "fee_recipient_address", + "Type": "string", + "Description": "the fee recipient address" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "the trade ID" + } +] diff --git a/source/json_tables/injective/stream/StreamRequest.json b/source/json_tables/injective/stream/StreamRequest.json new file mode 100644 index 00000000..460f2698 --- /dev/null +++ b/source/json_tables/injective/stream/StreamRequest.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "bank_balances_filter", + "Type": "BankBalancesFilter", + "Description": "filter for bank balances events", + "Required": "No" + }, + { + "Parameter": "subaccount_deposits_filter", + "Type": "SubaccountDepositsFilter", + "Description": "filter for subaccount deposits events", + "Required": "No" + }, + { + "Parameter": "spot_trades_filter", + "Type": "TradesFilter", + "Description": "filter for spot trades events", + "Required": "No" + }, + { + "Parameter": "derivative_trades_filter", + "Type": "TradesFilter", + "Description": "filter for derivative trades events", + "Required": "No" + }, + { + "Parameter": "spot_orders_filter", + "Type": "OrdersFilter", + "Description": "filter for spot orders events", + "Required": "No" + }, + { + "Parameter": "derivative_orders_filter", + "Type": "OrdersFilter", + "Description": "filter for derivative orders events", + "Required": "No" + }, + { + "Parameter": "spot_orderbooks_filter", + "Type": "OrderbookFilter", + "Description": "filter for spot orderbooks events", + "Required": "No" + }, + { + "Parameter": "derivative_orderbooks_filter", + "Type": "OrderbookFilter", + "Description": "filter for derivative orderbooks events", + "Required": "No" + }, + { + "Parameter": "positions_filter", + "Type": "PositionsFilter", + "Description": "filter for positions events", + "Required": "No" + }, + { + "Parameter": "oracle_price_filter", + "Type": "OraclePriceFilter", + "Description": "filter for oracle prices events", + "Required": "No" + } +] diff --git a/source/json_tables/injective/stream/StreamResponse.json b/source/json_tables/injective/stream/StreamResponse.json new file mode 100644 index 00000000..3103b7fa --- /dev/null +++ b/source/json_tables/injective/stream/StreamResponse.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "block_height", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "block_time", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "bank_balances", + "Type": "BankBalance array", + "Description": "" + }, + { + "Parameter": "subaccount_deposits", + "Type": "SubaccountDeposits array", + "Description": "" + }, + { + "Parameter": "spot_trades", + "Type": "SpotTrade array", + "Description": "" + }, + { + "Parameter": "derivative_trades", + "Type": "DerivativeTrade array", + "Description": "" + }, + { + "Parameter": "spot_orders", + "Type": "SpotOrderUpdate array", + "Description": "" + }, + { + "Parameter": "derivative_orders", + "Type": "DerivativeOrderUpdate array", + "Description": "" + }, + { + "Parameter": "spot_orderbook_updates", + "Type": "OrderbookUpdate array", + "Description": "" + }, + { + "Parameter": "derivative_orderbook_updates", + "Type": "OrderbookUpdate array", + "Description": "" + }, + { + "Parameter": "positions", + "Type": "Position array", + "Description": "" + }, + { + "Parameter": "oracle_prices", + "Type": "OraclePrice array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/SubaccountDeposit.json b/source/json_tables/injective/stream/SubaccountDeposit.json new file mode 100644 index 00000000..096fe3b8 --- /dev/null +++ b/source/json_tables/injective/stream/SubaccountDeposit.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "deposit", + "Type": "types.Deposit", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/SubaccountDeposits.json b/source/json_tables/injective/stream/SubaccountDeposits.json new file mode 100644 index 00000000..fa9df3eb --- /dev/null +++ b/source/json_tables/injective/stream/SubaccountDeposits.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "deposits", + "Type": "SubaccountDeposit array", + "Description": "the deposits details" + } +] diff --git a/source/json_tables/injective/stream/SubaccountDepositsFilter.json b/source/json_tables/injective/stream/SubaccountDepositsFilter.json new file mode 100644 index 00000000..a0f723f5 --- /dev/null +++ b/source/json_tables/injective/stream/SubaccountDepositsFilter.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/TradesFilter.json b/source/json_tables/injective/stream/TradesFilter.json new file mode 100644 index 00000000..a8f87975 --- /dev/null +++ b/source/json_tables/injective/stream/TradesFilter.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/v1beta1/OrderUpdateStatus.json b/source/json_tables/injective/stream/v1beta1/OrderUpdateStatus.json new file mode 100644 index 00000000..1e967f66 --- /dev/null +++ b/source/json_tables/injective/stream/v1beta1/OrderUpdateStatus.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "Unspecified" + }, + { + "Code": "1", + "Name": "Booked" + }, + { + "Code": "2", + "Name": "Matched" + }, + { + "Code": "3", + "Name": "Cancelled" + } +] diff --git a/source/json_tables/injective/stream/v2/BankBalance.json b/source/json_tables/injective/stream/v2/BankBalance.json new file mode 100644 index 00000000..e35680a1 --- /dev/null +++ b/source/json_tables/injective/stream/v2/BankBalance.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "account", + "Type": "string", + "Description": "the account address" + }, + { + "Parameter": "balances", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "list of account balances" + } +] diff --git a/source/json_tables/injective/stream/v2/BankBalancesFilter.json b/source/json_tables/injective/stream/v2/BankBalancesFilter.json new file mode 100644 index 00000000..9d0342b4 --- /dev/null +++ b/source/json_tables/injective/stream/v2/BankBalancesFilter.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "accounts", + "Type": "string array", + "Description": "list of account addresses to filter by" + } +] diff --git a/source/json_tables/injective/stream/v2/DerivativeOrder.json b/source/json_tables/injective/stream/v2/DerivativeOrder.json new file mode 100644 index 00000000..c4727ddb --- /dev/null +++ b/source/json_tables/injective/stream/v2/DerivativeOrder.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "order", + "Type": "v2.DerivativeLimitOrder", + "Description": "the order details" + }, + { + "Parameter": "is_market", + "Type": "bool", + "Description": "whether the order is a market order" + } +] diff --git a/source/json_tables/injective/stream/v2/DerivativeOrderUpdate.json b/source/json_tables/injective/stream/v2/DerivativeOrderUpdate.json new file mode 100644 index 00000000..2366cbd4 --- /dev/null +++ b/source/json_tables/injective/stream/v2/DerivativeOrderUpdate.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "status", + "Type": "OrderUpdateStatus", + "Description": "the status of the order" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "the order details" + } +] diff --git a/source/json_tables/injective/stream/v2/DerivativeTrade.json b/source/json_tables/injective/stream/v2/DerivativeTrade.json new file mode 100644 index 00000000..8b3c268b --- /dev/null +++ b/source/json_tables/injective/stream/v2/DerivativeTrade.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "is_buy", + "Type": "bool", + "Description": "whether the trade is a buy or sell" + }, + { + "Parameter": "executionType", + "Type": "string", + "Description": "the execution type" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "position_delta", + "Type": "v2.PositionDelta", + "Description": "the position delta of the trade (in human readable format)" + }, + { + "Parameter": "payout", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the payout of the trade (in human readable format)" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the fee of the trade (in human readable format)" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "fee_recipient_address", + "Type": "string", + "Description": "the fee recipient address" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "the trade ID" + } +] diff --git a/source/json_tables/injective/stream/v2/OraclePrice.json b/source/json_tables/injective/stream/v2/OraclePrice.json new file mode 100644 index 00000000..248a4ae2 --- /dev/null +++ b/source/json_tables/injective/stream/v2/OraclePrice.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "symbol", + "Type": "string", + "Description": "the symbol of the oracle price" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the updated price" + }, + { + "Parameter": "type", + "Type": "string", + "Description": "the oracle type" + } +] diff --git a/source/json_tables/injective/stream/v2/OraclePriceFilter.json b/source/json_tables/injective/stream/v2/OraclePriceFilter.json new file mode 100644 index 00000000..a6e264ab --- /dev/null +++ b/source/json_tables/injective/stream/v2/OraclePriceFilter.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "symbol", + "Type": "string array", + "Description": "list of symbol to filter by" + } +] diff --git a/source/json_tables/injective/stream/v2/OrderUpdateStatus.json b/source/json_tables/injective/stream/v2/OrderUpdateStatus.json new file mode 100644 index 00000000..1e967f66 --- /dev/null +++ b/source/json_tables/injective/stream/v2/OrderUpdateStatus.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "Unspecified" + }, + { + "Code": "1", + "Name": "Booked" + }, + { + "Code": "2", + "Name": "Matched" + }, + { + "Code": "3", + "Name": "Cancelled" + } +] diff --git a/source/json_tables/injective/stream/v2/Orderbook.json b/source/json_tables/injective/stream/v2/Orderbook.json new file mode 100644 index 00000000..07e703be --- /dev/null +++ b/source/json_tables/injective/stream/v2/Orderbook.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "buy_levels", + "Type": "v2.Level array", + "Description": "list of buy levels" + }, + { + "Parameter": "sell_levels", + "Type": "v2.Level array", + "Description": "list of sell levels" + } +] diff --git a/source/json_tables/injective/stream/v2/OrderbookFilter.json b/source/json_tables/injective/stream/v2/OrderbookFilter.json new file mode 100644 index 00000000..4d804e47 --- /dev/null +++ b/source/json_tables/injective/stream/v2/OrderbookFilter.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "list of market IDs to filter by" + } +] diff --git a/source/json_tables/injective/stream/v2/OrderbookUpdate.json b/source/json_tables/injective/stream/v2/OrderbookUpdate.json new file mode 100644 index 00000000..409e83c2 --- /dev/null +++ b/source/json_tables/injective/stream/v2/OrderbookUpdate.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "seq", + "Type": "uint64", + "Description": "the sequence number of the orderbook update" + }, + { + "Parameter": "orderbook", + "Type": "Orderbook", + "Description": "the orderbook details" + } +] diff --git a/source/json_tables/injective/stream/v2/OrdersFilter.json b/source/json_tables/injective/stream/v2/OrdersFilter.json new file mode 100644 index 00000000..25380deb --- /dev/null +++ b/source/json_tables/injective/stream/v2/OrdersFilter.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "list of subaccount IDs to filter by" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "list of market IDs to filter by" + } +] diff --git a/source/json_tables/injective/stream/v2/Position.json b/source/json_tables/injective/stream/v2/Position.json new file mode 100644 index 00000000..c070c651 --- /dev/null +++ b/source/json_tables/injective/stream/v2/Position.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "isLong", + "Type": "bool", + "Description": "whether the position is long or short" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the position (in human readable format)" + }, + { + "Parameter": "entry_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the entry price of the position (in human readable format)" + }, + { + "Parameter": "margin", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the margin of the position (in human readable format)" + }, + { + "Parameter": "cumulative_funding_entry", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the cumulative funding entry of the position (in human readable format)" + } +] diff --git a/source/json_tables/injective/stream/v2/PositionsFilter.json b/source/json_tables/injective/stream/v2/PositionsFilter.json new file mode 100644 index 00000000..25380deb --- /dev/null +++ b/source/json_tables/injective/stream/v2/PositionsFilter.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "list of subaccount IDs to filter by" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "list of market IDs to filter by" + } +] diff --git a/source/json_tables/injective/stream/v2/SpotOrder.json b/source/json_tables/injective/stream/v2/SpotOrder.json new file mode 100644 index 00000000..79701dd9 --- /dev/null +++ b/source/json_tables/injective/stream/v2/SpotOrder.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "order", + "Type": "v2.SpotLimitOrder", + "Description": "the order details" + } +] diff --git a/source/json_tables/injective/stream/v2/SpotOrderUpdate.json b/source/json_tables/injective/stream/v2/SpotOrderUpdate.json new file mode 100644 index 00000000..f5d0927a --- /dev/null +++ b/source/json_tables/injective/stream/v2/SpotOrderUpdate.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "status", + "Type": "OrderUpdateStatus", + "Description": "the status of the order" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID" + }, + { + "Parameter": "order", + "Type": "SpotOrder", + "Description": "the order details" + } +] diff --git a/source/json_tables/injective/stream/v2/SpotTrade.json b/source/json_tables/injective/stream/v2/SpotTrade.json new file mode 100644 index 00000000..cb9b5c85 --- /dev/null +++ b/source/json_tables/injective/stream/v2/SpotTrade.json @@ -0,0 +1,57 @@ +[ + { + "Parameter": "market_id", + "Type": "string", + "Description": "the market ID" + }, + { + "Parameter": "is_buy", + "Type": "bool", + "Description": "whether the trade is a buy or sell" + }, + { + "Parameter": "executionType", + "Type": "string", + "Description": "the execution type" + }, + { + "Parameter": "quantity", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the quantity of the trade (in human readable format)" + }, + { + "Parameter": "price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the price of the trade (in human readable format)" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID that executed the trade" + }, + { + "Parameter": "fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "the fee of the trade (in human readable format)" + }, + { + "Parameter": "order_hash", + "Type": "string", + "Description": "the order hash" + }, + { + "Parameter": "fee_recipient_address", + "Type": "string", + "Description": "the fee recipient address" + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "the client order ID" + }, + { + "Parameter": "trade_id", + "Type": "string", + "Description": "the trade ID" + } +] diff --git a/source/json_tables/injective/stream/v2/StreamRequest.json b/source/json_tables/injective/stream/v2/StreamRequest.json new file mode 100644 index 00000000..460f2698 --- /dev/null +++ b/source/json_tables/injective/stream/v2/StreamRequest.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "bank_balances_filter", + "Type": "BankBalancesFilter", + "Description": "filter for bank balances events", + "Required": "No" + }, + { + "Parameter": "subaccount_deposits_filter", + "Type": "SubaccountDepositsFilter", + "Description": "filter for subaccount deposits events", + "Required": "No" + }, + { + "Parameter": "spot_trades_filter", + "Type": "TradesFilter", + "Description": "filter for spot trades events", + "Required": "No" + }, + { + "Parameter": "derivative_trades_filter", + "Type": "TradesFilter", + "Description": "filter for derivative trades events", + "Required": "No" + }, + { + "Parameter": "spot_orders_filter", + "Type": "OrdersFilter", + "Description": "filter for spot orders events", + "Required": "No" + }, + { + "Parameter": "derivative_orders_filter", + "Type": "OrdersFilter", + "Description": "filter for derivative orders events", + "Required": "No" + }, + { + "Parameter": "spot_orderbooks_filter", + "Type": "OrderbookFilter", + "Description": "filter for spot orderbooks events", + "Required": "No" + }, + { + "Parameter": "derivative_orderbooks_filter", + "Type": "OrderbookFilter", + "Description": "filter for derivative orderbooks events", + "Required": "No" + }, + { + "Parameter": "positions_filter", + "Type": "PositionsFilter", + "Description": "filter for positions events", + "Required": "No" + }, + { + "Parameter": "oracle_price_filter", + "Type": "OraclePriceFilter", + "Description": "filter for oracle prices events", + "Required": "No" + } +] diff --git a/source/json_tables/injective/stream/v2/StreamResponse.json b/source/json_tables/injective/stream/v2/StreamResponse.json new file mode 100644 index 00000000..1ae567b6 --- /dev/null +++ b/source/json_tables/injective/stream/v2/StreamResponse.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "block_height", + "Type": "uint64", + "Description": "the block height" + }, + { + "Parameter": "block_time", + "Type": "int64", + "Description": "the block time" + }, + { + "Parameter": "bank_balances", + "Type": "BankBalance array", + "Description": "list of bank balances updates" + }, + { + "Parameter": "subaccount_deposits", + "Type": "SubaccountDeposits array", + "Description": "list of subaccount deposits updates" + }, + { + "Parameter": "spot_trades", + "Type": "SpotTrade array", + "Description": "list of spot trades updates" + }, + { + "Parameter": "derivative_trades", + "Type": "DerivativeTrade array", + "Description": "list of derivative trades updates" + }, + { + "Parameter": "spot_orders", + "Type": "SpotOrderUpdate array", + "Description": "list of spot orders updates" + }, + { + "Parameter": "derivative_orders", + "Type": "DerivativeOrderUpdate array", + "Description": "list of derivative orders updates" + }, + { + "Parameter": "spot_orderbook_updates", + "Type": "OrderbookUpdate array", + "Description": "list of spot orderbook updates" + }, + { + "Parameter": "derivative_orderbook_updates", + "Type": "OrderbookUpdate array", + "Description": "list of derivative orderbook updates" + }, + { + "Parameter": "positions", + "Type": "Position array", + "Description": "list of positions updates" + }, + { + "Parameter": "oracle_prices", + "Type": "OraclePrice array", + "Description": "list of oracle prices updates" + }, + { + "Parameter": "gas_price", + "Type": "string", + "Description": "the current gas price when the block was processed (in chain format)" + } +] diff --git a/source/json_tables/injective/stream/v2/SubaccountDeposit.json b/source/json_tables/injective/stream/v2/SubaccountDeposit.json new file mode 100644 index 00000000..6cc21a9a --- /dev/null +++ b/source/json_tables/injective/stream/v2/SubaccountDeposit.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "deposit", + "Type": "v2.Deposit", + "Description": "" + } +] diff --git a/source/json_tables/injective/stream/v2/SubaccountDeposits.json b/source/json_tables/injective/stream/v2/SubaccountDeposits.json new file mode 100644 index 00000000..fa9df3eb --- /dev/null +++ b/source/json_tables/injective/stream/v2/SubaccountDeposits.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID" + }, + { + "Parameter": "deposits", + "Type": "SubaccountDeposit array", + "Description": "the deposits details" + } +] diff --git a/source/json_tables/injective/stream/v2/SubaccountDepositsFilter.json b/source/json_tables/injective/stream/v2/SubaccountDepositsFilter.json new file mode 100644 index 00000000..37a9ad12 --- /dev/null +++ b/source/json_tables/injective/stream/v2/SubaccountDepositsFilter.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "list of subaccount IDs to filter by" + } +] diff --git a/source/json_tables/injective/stream/v2/TradesFilter.json b/source/json_tables/injective/stream/v2/TradesFilter.json new file mode 100644 index 00000000..25380deb --- /dev/null +++ b/source/json_tables/injective/stream/v2/TradesFilter.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_ids", + "Type": "string array", + "Description": "list of subaccount IDs to filter by" + }, + { + "Parameter": "market_ids", + "Type": "string array", + "Description": "list of market IDs to filter by" + } +] diff --git a/source/json_tables/injective/tokenfactory/DenomAuthorityMetadata.json b/source/json_tables/injective/tokenfactory/DenomAuthorityMetadata.json new file mode 100644 index 00000000..f039f5aa --- /dev/null +++ b/source/json_tables/injective/tokenfactory/DenomAuthorityMetadata.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "admin", + "Type": "string", + "Description": "Can be empty for no admin, or a valid injective address" + }, + { + "Parameter": "admin_burn_allowed", + "Type": "bool", + "Description": "true if the admin can burn tokens from other addresses" + } +] diff --git a/source/json_tables/injective/tokenfactory/GenesisDenom.json b/source/json_tables/injective/tokenfactory/GenesisDenom.json new file mode 100644 index 00000000..f5e3f980 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/GenesisDenom.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "denom", + "Type": "string", + "Description": "" + }, + { + "Parameter": "authority_metadata", + "Type": "DenomAuthorityMetadata", + "Description": "" + }, + { + "Parameter": "name", + "Type": "string", + "Description": "" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "" + }, + { + "Parameter": "decimals", + "Type": "uint32", + "Description": "" + } +] diff --git a/source/json_tables/injective/tokenfactory/GenesisState.json b/source/json_tables/injective/tokenfactory/GenesisState.json new file mode 100644 index 00000000..062c10e9 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/GenesisState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + }, + { + "Parameter": "factory_denoms", + "Type": "GenesisDenom array", + "Description": "" + } +] diff --git a/source/json_tables/injective/tokenfactory/MsgBurn.json b/source/json_tables/injective/tokenfactory/MsgBurn.json new file mode 100644 index 00000000..3d85de42 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/MsgBurn.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "burnFromAddress", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/tokenfactory/MsgChangeAdmin.json b/source/json_tables/injective/tokenfactory/MsgChangeAdmin.json new file mode 100644 index 00000000..cbef9bb7 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/MsgChangeAdmin.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "denom", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "new_admin", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/tokenfactory/MsgCreateDenom.json b/source/json_tables/injective/tokenfactory/MsgCreateDenom.json new file mode 100644 index 00000000..980b488e --- /dev/null +++ b/source/json_tables/injective/tokenfactory/MsgCreateDenom.json @@ -0,0 +1,38 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "subdenom", + "Type": "string", + "Description": "subdenom can be up to 44 \"alphanumeric\" characters long.", + "Required": "Yes" + }, + { + "Parameter": "name", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "symbol", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "decimals", + "Type": "uint32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "allow_admin_burn", + "Type": "bool", + "Description": "true if admins are allowed to burn tokens from other addresses", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/tokenfactory/MsgCreateDenomResponse.json b/source/json_tables/injective/tokenfactory/MsgCreateDenomResponse.json new file mode 100644 index 00000000..b90cf88a --- /dev/null +++ b/source/json_tables/injective/tokenfactory/MsgCreateDenomResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "new_token_denom", + "Type": "string", + "Description": "" + } +] diff --git a/source/json_tables/injective/tokenfactory/MsgMint.json b/source/json_tables/injective/tokenfactory/MsgMint.json new file mode 100644 index 00000000..9a591d49 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/MsgMint.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "amount", + "Type": "types.Coin", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "receiver", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/tokenfactory/MsgSetDenomMetadata.json b/source/json_tables/injective/tokenfactory/MsgSetDenomMetadata.json new file mode 100644 index 00000000..eba531e8 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/MsgSetDenomMetadata.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "metadata", + "Type": "types1.Metadata", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "admin_burn_disabled", + "Type": "MsgSetDenomMetadata_AdminBurnDisabled", + "Description": "", + "Required": "No" + }, + { + "Parameter": "should_disable", + "Type": "bool", + "Description": "true if the admin burn capability should be disabled", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/tokenfactory/MsgUpdateParams.json b/source/json_tables/injective/tokenfactory/MsgUpdateParams.json new file mode 100644 index 00000000..df52fbb3 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the tokenfactory parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/tokenfactory/Params.json b/source/json_tables/injective/tokenfactory/Params.json new file mode 100644 index 00000000..f67c0825 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/Params.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "denom_creation_fee", + "Type": "github_com_cosmos_cosmos_sdk_types.Coins", + "Description": "" + } +] diff --git a/source/json_tables/injective/tokenfactory/QueryDenomAuthorityMetadataRequest.json b/source/json_tables/injective/tokenfactory/QueryDenomAuthorityMetadataRequest.json new file mode 100644 index 00000000..00e694ff --- /dev/null +++ b/source/json_tables/injective/tokenfactory/QueryDenomAuthorityMetadataRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "creator", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "sub_denom", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/tokenfactory/QueryDenomAuthorityMetadataResponse.json b/source/json_tables/injective/tokenfactory/QueryDenomAuthorityMetadataResponse.json new file mode 100644 index 00000000..66299871 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/QueryDenomAuthorityMetadataResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "authority_metadata", + "Type": "DenomAuthorityMetadata", + "Description": "" + } +] diff --git a/source/json_tables/injective/tokenfactory/QueryDenomsFromCreatorRequest.json b/source/json_tables/injective/tokenfactory/QueryDenomsFromCreatorRequest.json new file mode 100644 index 00000000..ab113ce6 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/QueryDenomsFromCreatorRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "creator", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/tokenfactory/QueryDenomsFromCreatorResponse.json b/source/json_tables/injective/tokenfactory/QueryDenomsFromCreatorResponse.json new file mode 100644 index 00000000..ad26b14d --- /dev/null +++ b/source/json_tables/injective/tokenfactory/QueryDenomsFromCreatorResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "denoms", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/tokenfactory/QueryModuleStateResponse.json b/source/json_tables/injective/tokenfactory/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/tokenfactory/QueryParamsResponse.json b/source/json_tables/injective/tokenfactory/QueryParamsResponse.json new file mode 100644 index 00000000..27703560 --- /dev/null +++ b/source/json_tables/injective/tokenfactory/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + } +] diff --git a/source/json_tables/injective/txfees/EipBaseFee.json b/source/json_tables/injective/txfees/EipBaseFee.json new file mode 100644 index 00000000..f4de56cf --- /dev/null +++ b/source/json_tables/injective/txfees/EipBaseFee.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "base_fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/txfees/GenesisState.json b/source/json_tables/injective/txfees/GenesisState.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/txfees/GenesisState.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/txfees/MsgUpdateParams.json b/source/json_tables/injective/txfees/MsgUpdateParams.json new file mode 100644 index 00000000..7e63c10e --- /dev/null +++ b/source/json_tables/injective/txfees/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the ocr parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/txfees/Params.json b/source/json_tables/injective/txfees/Params.json new file mode 100644 index 00000000..e104010e --- /dev/null +++ b/source/json_tables/injective/txfees/Params.json @@ -0,0 +1,67 @@ +[ + { + "Parameter": "max_gas_wanted_per_tx", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "high_gas_tx_threshold", + "Type": "uint64", + "Description": "" + }, + { + "Parameter": "min_gas_price_for_high_gas_tx", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "mempool1559_enabled", + "Type": "bool", + "Description": "" + }, + { + "Parameter": "min_gas_price", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "default_base_fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "max_base_fee_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "reset_interval", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "max_block_change_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "target_block_space_percent_rate", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "recheck_fee_low_base_fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "recheck_fee_high_base_fee", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + }, + { + "Parameter": "recheck_fee_base_fee_threshold_multiplier", + "Type": "cosmossdk_io_math.LegacyDec", + "Description": "" + } +] diff --git a/source/json_tables/injective/txfees/QueryEipBaseFeeResponse.json b/source/json_tables/injective/txfees/QueryEipBaseFeeResponse.json new file mode 100644 index 00000000..5f2068bb --- /dev/null +++ b/source/json_tables/injective/txfees/QueryEipBaseFeeResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "base_fee", + "Type": "EipBaseFee", + "Description": "" + } +] diff --git a/source/json_tables/injective/txfees/QueryParamsResponse.json b/source/json_tables/injective/txfees/QueryParamsResponse.json new file mode 100644 index 00000000..27703560 --- /dev/null +++ b/source/json_tables/injective/txfees/QueryParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the parameters of the module." + } +] diff --git a/source/json_tables/injective/types/EthAccount.json b/source/json_tables/injective/types/EthAccount.json new file mode 100644 index 00000000..1ec26b0a --- /dev/null +++ b/source/json_tables/injective/types/EthAccount.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "code_hash", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/types/ExtensionOptionsWeb3Tx.json b/source/json_tables/injective/types/ExtensionOptionsWeb3Tx.json new file mode 100644 index 00000000..0365556a --- /dev/null +++ b/source/json_tables/injective/types/ExtensionOptionsWeb3Tx.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "typedDataChainID", + "Type": "uint64", + "Description": "typedDataChainID used only in EIP712 Domain and should match Ethereum network ID in a Web3 provider (e.g. Metamask)." + }, + { + "Parameter": "feePayer", + "Type": "string", + "Description": "feePayer is an account address for the fee payer. It will be validated during EIP712 signature checking." + }, + { + "Parameter": "feePayerSig", + "Type": "byte array", + "Description": "feePayerSig is a signature data from the fee paying account, allows to perform fee delegation when using EIP712 Domain." + } +] diff --git a/source/json_tables/injective/types/TxResponseData.json b/source/json_tables/injective/types/TxResponseData.json new file mode 100644 index 00000000..91883fb0 --- /dev/null +++ b/source/json_tables/injective/types/TxResponseData.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "messages", + "Type": "TxResponseGenericMessage array", + "Description": "" + } +] diff --git a/source/json_tables/injective/types/TxResponseGenericMessage.json b/source/json_tables/injective/types/TxResponseGenericMessage.json new file mode 100644 index 00000000..b3242914 --- /dev/null +++ b/source/json_tables/injective/types/TxResponseGenericMessage.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "header", + "Type": "string", + "Description": "" + }, + { + "Parameter": "data", + "Type": "byte array", + "Description": "" + } +] diff --git a/source/json_tables/injective/types/TxResult.json b/source/json_tables/injective/types/TxResult.json new file mode 100644 index 00000000..e8a7bf36 --- /dev/null +++ b/source/json_tables/injective/types/TxResult.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "height", + "Type": "int64", + "Description": "height of the blockchain" + }, + { + "Parameter": "tx_index", + "Type": "uint32", + "Description": "tx_index of the cosmos transaction" + }, + { + "Parameter": "msg_index", + "Type": "uint32", + "Description": "msg_index in a batch transaction" + }, + { + "Parameter": "eth_tx_index", + "Type": "int32", + "Description": "eth_tx_index is the index in the list of valid eth tx in the block, aka. the transaction list returned by eth_getBlock api." + }, + { + "Parameter": "failed", + "Type": "bool", + "Description": "failed is true if the eth transaction did not go succeed" + }, + { + "Parameter": "gas_used", + "Type": "uint64", + "Description": "gas_used by the transaction. If it exceeds the block gas limit, it's set to gas limit, which is what's actually deducted by ante handler." + }, + { + "Parameter": "cumulative_gas_used", + "Type": "uint64", + "Description": "cumulative_gas_used specifies the cumulated amount of gas used for all processed messages within the current batch transaction." + } +] diff --git a/source/json_tables/injective/wasmx/BatchContractDeregistrationProposal.json b/source/json_tables/injective/wasmx/BatchContractDeregistrationProposal.json new file mode 100644 index 00000000..857c7fa4 --- /dev/null +++ b/source/json_tables/injective/wasmx/BatchContractDeregistrationProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "contracts", + "Type": "string array", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/BatchContractRegistrationRequestProposal.json b/source/json_tables/injective/wasmx/BatchContractRegistrationRequestProposal.json new file mode 100644 index 00000000..4e9bd0d8 --- /dev/null +++ b/source/json_tables/injective/wasmx/BatchContractRegistrationRequestProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "contract_registration_requests", + "Type": "ContractRegistrationRequest array", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/BatchStoreCodeProposal.json b/source/json_tables/injective/wasmx/BatchStoreCodeProposal.json new file mode 100644 index 00000000..37391d8c --- /dev/null +++ b/source/json_tables/injective/wasmx/BatchStoreCodeProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "proposals", + "Type": "types.StoreCodeProposal array", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/ContractExecutionCompatAuthorization.json b/source/json_tables/injective/wasmx/ContractExecutionCompatAuthorization.json new file mode 100644 index 00000000..7e41d8a3 --- /dev/null +++ b/source/json_tables/injective/wasmx/ContractExecutionCompatAuthorization.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "grants", + "Type": "types.ContractGrant array", + "Description": "Grants for contract executions" + } +] diff --git a/source/json_tables/injective/wasmx/ContractRegistrationRequest.json b/source/json_tables/injective/wasmx/ContractRegistrationRequest.json new file mode 100644 index 00000000..7cb0718f --- /dev/null +++ b/source/json_tables/injective/wasmx/ContractRegistrationRequest.json @@ -0,0 +1,56 @@ +[ + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Unique Identifier for contract instance to be registered.", + "Required": "Yes" + }, + { + "Parameter": "gas_limit", + "Type": "uint64", + "Description": "Maximum gas to be used for the smart contract execution.", + "Required": "Yes" + }, + { + "Parameter": "gas_price", + "Type": "uint64", + "Description": "gas price to be used for the smart contract execution.", + "Required": "Yes" + }, + { + "Parameter": "should_pin_contract", + "Type": "bool", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "is_migration_allowed", + "Type": "bool", + "Description": "if true contract owner can update it, if false only current code_id will be allowed to be executed", + "Required": "Yes" + }, + { + "Parameter": "code_id", + "Type": "uint64", + "Description": "code_id of the contract being registered - will be verified upon every execution but only if is_migration_allowed is false", + "Required": "Yes" + }, + { + "Parameter": "admin_address", + "Type": "string", + "Description": "Optional address of admin account (that will be allowed to pause or update contract params)", + "Required": "No" + }, + { + "Parameter": "granter_address", + "Type": "string", + "Description": "Optional address of the contract that grants fees. Must be set if funding_mode is other than SelfFunded", + "Required": "No" + }, + { + "Parameter": "funding_mode", + "Type": "FundingMode", + "Description": "Specifies how the contract will fund its execution", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/wasmx/ContractRegistrationRequestProposal.json b/source/json_tables/injective/wasmx/ContractRegistrationRequestProposal.json new file mode 100644 index 00000000..8037bd3f --- /dev/null +++ b/source/json_tables/injective/wasmx/ContractRegistrationRequestProposal.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "title", + "Type": "string", + "Description": "" + }, + { + "Parameter": "description", + "Type": "string", + "Description": "" + }, + { + "Parameter": "contract_registration_request", + "Type": "ContractRegistrationRequest", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/GenesisState.json b/source/json_tables/injective/wasmx/GenesisState.json new file mode 100644 index 00000000..d85228eb --- /dev/null +++ b/source/json_tables/injective/wasmx/GenesisState.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines all the parameters of related to wasmx." + }, + { + "Parameter": "registered_contracts", + "Type": "RegisteredContractWithAddress array", + "Description": "registered_contracts is an array containing the genesis registered contracts" + } +] diff --git a/source/json_tables/injective/wasmx/MsgActivateContract.json b/source/json_tables/injective/wasmx/MsgActivateContract.json new file mode 100644 index 00000000..28ccf001 --- /dev/null +++ b/source/json_tables/injective/wasmx/MsgActivateContract.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Unique Identifier for contract instance to be activated.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/wasmx/MsgDeactivateContract.json b/source/json_tables/injective/wasmx/MsgDeactivateContract.json new file mode 100644 index 00000000..9cd19ee9 --- /dev/null +++ b/source/json_tables/injective/wasmx/MsgDeactivateContract.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Unique Identifier for contract instance to be deactivated.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/wasmx/MsgExecuteContractCompat.json b/source/json_tables/injective/wasmx/MsgExecuteContractCompat.json new file mode 100644 index 00000000..512eb3ac --- /dev/null +++ b/source/json_tables/injective/wasmx/MsgExecuteContractCompat.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "Sender is the that actor that signed the messages", + "Required": "Yes" + }, + { + "Parameter": "contract", + "Type": "string", + "Description": "Contract is the address of the smart contract", + "Required": "Yes" + }, + { + "Parameter": "msg", + "Type": "string", + "Description": "Msg json encoded message to be passed to the contract", + "Required": "Yes" + }, + { + "Parameter": "funds", + "Type": "string", + "Description": "Funds coins that are transferred to the contract on execution", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/wasmx/MsgExecuteContractCompatResponse.json b/source/json_tables/injective/wasmx/MsgExecuteContractCompatResponse.json new file mode 100644 index 00000000..da10c817 --- /dev/null +++ b/source/json_tables/injective/wasmx/MsgExecuteContractCompatResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "data", + "Type": "byte array", + "Description": "Data contains bytes to returned from the contract" + } +] diff --git a/source/json_tables/injective/wasmx/MsgRegisterContract.json b/source/json_tables/injective/wasmx/MsgRegisterContract.json new file mode 100644 index 00000000..256ef58f --- /dev/null +++ b/source/json_tables/injective/wasmx/MsgRegisterContract.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "contract_registration_request", + "Type": "ContractRegistrationRequest", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/wasmx/MsgUpdateContract.json b/source/json_tables/injective/wasmx/MsgUpdateContract.json new file mode 100644 index 00000000..87a5064a --- /dev/null +++ b/source/json_tables/injective/wasmx/MsgUpdateContract.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "contract_address", + "Type": "string", + "Description": "Unique Identifier for contract instance to be registered.", + "Required": "Yes" + }, + { + "Parameter": "gas_limit", + "Type": "uint64", + "Description": "Maximum gas to be used for the smart contract execution.", + "Required": "Yes" + }, + { + "Parameter": "gas_price", + "Type": "uint64", + "Description": "gas price to be used for the smart contract execution.", + "Required": "Yes" + }, + { + "Parameter": "admin_address", + "Type": "string", + "Description": "optional - admin account that will be allowed to perform any changes", + "Required": "No" + } +] diff --git a/source/json_tables/injective/wasmx/MsgUpdateParams.json b/source/json_tables/injective/wasmx/MsgUpdateParams.json new file mode 100644 index 00000000..0124ad21 --- /dev/null +++ b/source/json_tables/injective/wasmx/MsgUpdateParams.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "authority", + "Type": "string", + "Description": "authority is the address of the governance account.", + "Required": "Yes" + }, + { + "Parameter": "params", + "Type": "Params", + "Description": "params defines the wasmx parameters to update. NOTE: All parameters must be supplied.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/wasmx/Params.json b/source/json_tables/injective/wasmx/Params.json new file mode 100644 index 00000000..3a7c3b6f --- /dev/null +++ b/source/json_tables/injective/wasmx/Params.json @@ -0,0 +1,27 @@ +[ + { + "Parameter": "is_execution_enabled", + "Type": "bool", + "Description": "Set the status to active to indicate that contracts can be executed in begin blocker." + }, + { + "Parameter": "max_begin_block_total_gas", + "Type": "uint64", + "Description": "Maximum aggregate total gas to be used for the contract executions in the BeginBlocker." + }, + { + "Parameter": "max_contract_gas_limit", + "Type": "uint64", + "Description": "the maximum gas limit each individual contract can consume in the BeginBlocker." + }, + { + "Parameter": "min_gas_price", + "Type": "uint64", + "Description": "min_gas_price defines the minimum gas price the contracts must pay to be executed in the BeginBlocker." + }, + { + "Parameter": "register_contract_access", + "Type": "types.AccessConfig", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/QueryContractRegistrationInfoRequest.json b/source/json_tables/injective/wasmx/QueryContractRegistrationInfoRequest.json new file mode 100644 index 00000000..f1a32a26 --- /dev/null +++ b/source/json_tables/injective/wasmx/QueryContractRegistrationInfoRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "contract_address", + "Type": "string", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/wasmx/QueryContractRegistrationInfoResponse.json b/source/json_tables/injective/wasmx/QueryContractRegistrationInfoResponse.json new file mode 100644 index 00000000..773ae155 --- /dev/null +++ b/source/json_tables/injective/wasmx/QueryContractRegistrationInfoResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "contract", + "Type": "RegisteredContract", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/QueryModuleStateResponse.json b/source/json_tables/injective/wasmx/QueryModuleStateResponse.json new file mode 100644 index 00000000..5b5e4fd1 --- /dev/null +++ b/source/json_tables/injective/wasmx/QueryModuleStateResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "state", + "Type": "GenesisState", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/QueryWasmxParamsResponse.json b/source/json_tables/injective/wasmx/QueryWasmxParamsResponse.json new file mode 100644 index 00000000..bfe78fa4 --- /dev/null +++ b/source/json_tables/injective/wasmx/QueryWasmxParamsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "params", + "Type": "Params", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/RegisteredContract.json b/source/json_tables/injective/wasmx/RegisteredContract.json new file mode 100644 index 00000000..4f50f049 --- /dev/null +++ b/source/json_tables/injective/wasmx/RegisteredContract.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "gas_limit", + "Type": "uint64", + "Description": "limit of gas per BB execution" + }, + { + "Parameter": "gas_price", + "Type": "uint64", + "Description": "gas price that contract is willing to pay for execution in BeginBlocker" + }, + { + "Parameter": "is_executable", + "Type": "bool", + "Description": "is contract currently active" + }, + { + "Parameter": "code_id", + "Type": "uint64", + "Description": "code_id that is allowed to be executed (to prevent malicious updates) - if nil/0 any code_id can be executed" + }, + { + "Parameter": "admin_address", + "Type": "string", + "Description": "optional - admin addr that is allowed to update contract data" + }, + { + "Parameter": "granter_address", + "Type": "string", + "Description": "Optional: address of the contract granting fee Must be set if fund_mode is GrantOnly" + }, + { + "Parameter": "fund_mode", + "Type": "FundingMode", + "Description": "funding mode" + } +] diff --git a/source/json_tables/injective/wasmx/RegisteredContractWithAddress.json b/source/json_tables/injective/wasmx/RegisteredContractWithAddress.json new file mode 100644 index 00000000..92e58e9c --- /dev/null +++ b/source/json_tables/injective/wasmx/RegisteredContractWithAddress.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "registered_contract", + "Type": "RegisteredContract", + "Description": "" + } +] diff --git a/source/json_tables/injective/wasmx/v1/FundingMode.json b/source/json_tables/injective/wasmx/v1/FundingMode.json new file mode 100644 index 00000000..199d166c --- /dev/null +++ b/source/json_tables/injective/wasmx/v1/FundingMode.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "Unspecified" + }, + { + "Code": "1", + "Name": "SelfFunded" + }, + { + "Code": "2", + "Name": "GrantOnly" + }, + { + "Code": "3", + "Name": "Dual" + } +]