Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

vana

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vana - npm Package Compare versions

Comparing version
0.44.0
to
0.45.0
+1
-1
PKG-INFO
Metadata-Version: 2.3
Name: vana
Version: 0.44.0
Version: 0.45.0
Summary:

@@ -5,0 +5,0 @@ Author: Tim Nunamaker

[tool.poetry]
name = "vana"
version = "0.44.0"
version = "0.45.0"
description = ""

@@ -5,0 +5,0 @@ authors = ["Tim Nunamaker <tim@vana.com>", "Volodymyr Isai <volod@vana.com>", "Kahtaf Alam <kahtaf@vana.com>"]

@@ -18,3 +18,3 @@ # The MIT License (MIT)

__version__ = "0.44.0"
__version__ = "0.45.0"

@@ -21,0 +21,0 @@ import rich

@@ -6,6 +6,6 @@ contracts = {

"RootNetworkContract": "0xff14346dF2B8Fd0c95BF34f1c92e49417b508AD5",
"DataRefinerRegistry": "0xF82248a6674F416fDe17E09841A703bE8720fF99",
"ComputeInstructionRegistry": "0x2b0D1F150fA064e54935C62811aDde8bd9a5a0ec",
"ComputeEngine": "0x959C44c02c5ac8e3066319102b2Fc2412E15B6a8",
"QueryEngine": "0xe8BB204AC13bE9f01519C0027EdC0EB371C86c0a",
"DataRefinerRegistry": "0x93c3EF89369fDcf08Be159D9DeF0F18AB6Be008c",
"ComputeInstructionRegistry": "0x5786B12b4c6Ba2bFAF0e77Ed30Bf6d32805563A5",
"ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd",
"QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490",
},

@@ -16,6 +16,6 @@ "islander": {

"RootNetworkContract": "0xff14346dF2B8Fd0c95BF34f1c92e49417b508AD5",
"DataRefinerRegistry": "0xF82248a6674F416fDe17E09841A703bE8720fF99",
"ComputeInstructionRegistry": "0x2b0D1F150fA064e54935C62811aDde8bd9a5a0ec",
"ComputeEngine": "0x959C44c02c5ac8e3066319102b2Fc2412E15B6a8",
"QueryEngine": "0xe8BB204AC13bE9f01519C0027EdC0EB371C86c0a",
"DataRefinerRegistry": "0x93c3EF89369fDcf08Be159D9DeF0F18AB6Be008c",
"ComputeInstructionRegistry": "0x5786B12b4c6Ba2bFAF0e77Ed30Bf6d32805563A5",
"ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd",
"QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490",
},

@@ -26,6 +26,6 @@ "maya": {

"RootNetworkContract": "0xf408A064d640b620219F510963646Ed2bD5606BB",
"DataRefinerRegistry": "0xF82248a6674F416fDe17E09841A703bE8720fF99",
"ComputeInstructionRegistry": "0x2b0D1F150fA064e54935C62811aDde8bd9a5a0ec",
"ComputeEngine": "0x959C44c02c5ac8e3066319102b2Fc2412E15B6a8",
"QueryEngine": "0xe8BB204AC13bE9f01519C0027EdC0EB371C86c0a",
"DataRefinerRegistry": "0x93c3EF89369fDcf08Be159D9DeF0F18AB6Be008c",
"ComputeInstructionRegistry": "0x5786B12b4c6Ba2bFAF0e77Ed30Bf6d32805563A5",
"ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd",
"QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490",
},

@@ -36,6 +36,6 @@ "satori": {

"RootNetworkContract": "0xf408A064d640b620219F510963646Ed2bD5606BB",
"DataRefinerRegistry": "0xF82248a6674F416fDe17E09841A703bE8720fF99",
"ComputeInstructionRegistry": "0x2b0D1F150fA064e54935C62811aDde8bd9a5a0ec",
"ComputeEngine": "0x959C44c02c5ac8e3066319102b2Fc2412E15B6a8",
"QueryEngine": "0xe8BB204AC13bE9f01519C0027EdC0EB371C86c0a",
"DataRefinerRegistry": "0x93c3EF89369fDcf08Be159D9DeF0F18AB6Be008c",
"ComputeInstructionRegistry": "0x5786B12b4c6Ba2bFAF0e77Ed30Bf6d32805563A5",
"ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd",
"QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490",
},

@@ -46,7 +46,7 @@ "moksha": {

"RootNetworkContract": "0xff14346dF2B8Fd0c95BF34f1c92e49417b508AD5",
"DataRefinerRegistry": "0xF82248a6674F416fDe17E09841A703bE8720fF99",
"ComputeInstructionRegistry": "0x2b0D1F150fA064e54935C62811aDde8bd9a5a0ec",
"ComputeEngine": "0x959C44c02c5ac8e3066319102b2Fc2412E15B6a8",
"QueryEngine": "0xe8BB204AC13bE9f01519C0027EdC0EB371C86c0a",
"DataRefinerRegistry": "0x93c3EF89369fDcf08Be159D9DeF0F18AB6Be008c",
"ComputeInstructionRegistry": "0x5786B12b4c6Ba2bFAF0e77Ed30Bf6d32805563A5",
"ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd",
"QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490",
},
}

@@ -5,3 +5,2 @@ import json

import requests
from web3 import Web3

@@ -14,24 +13,34 @@ import vana

try:
base_url = f"https://api.{network}.vanascan.io/api/v2/smart-contracts"
rpc_url = f"https://rpc.{network}.vana.org"
# Determine VanaScan API base URLs based on network
if network == "vana":
api_base_url = "https://vanascan.io/api/v2"
else:
api_base_url = f"https://api.{network}.vanascan.io/api/v2"
# Connect to the network
w3 = Web3(Web3.HTTPProvider(rpc_url))
# Fetch contract details to find implementation address if it's a proxy
address_response = requests.get(f"{api_base_url}/addresses/{contract_hash}")
address_response.raise_for_status()
address_data = address_response.json()
# ERC1967 implementation slot
implementation_slot = '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc'
address_to_fetch_abi_from = contract_hash # Default to original hash
implementations = address_data.get('implementations')
if address_data.get('is_contract') and implementations and isinstance(implementations, list) and len(implementations) > 0:
# It's a proxy, use the first implementation address
implementation_address = implementations[0].get('address')
if implementation_address:
address_to_fetch_abi_from = implementation_address
vana.logging.info(f"Proxy detected. Using implementation address: {implementation_address}")
else:
vana.logging.warning(f"Proxy detected but no implementation address found in response for {contract_hash}. Using original address.")
else:
vana.logging.info(f"Contract {contract_hash} is not a proxy or implementation not found. Using original address.")
# Get the implementation address
implementation_address = w3.eth.get_storage_at(contract_hash, implementation_slot)
# If address is 0x0000...0000, it means the contract is not a proxy, use its address as implementation address
implementation_address = '0x' + implementation_address.hex()[-40:] if implementation_address != b'\x00' * 32 else contract_hash
# Fetch ABI from the implementation or original address
abi_response = requests.get(f"{api_base_url}/smart-contracts/{address_to_fetch_abi_from}")
abi_response.raise_for_status()
# Fetch ABI from the implementation
implementation_response = requests.get(f"{base_url}/{implementation_address}")
implementation_response.raise_for_status()
# Extract the ABI from the response
abi = implementation_response.json().get('abi')
abi = abi_response.json().get('abi')
if not abi:
vana.logging.error(f"No ABI found for contract {contract_name} with hash {contract_hash}")
vana.logging.error(f"No ABI found for contract {contract_name} (hash: {contract_hash}, fetched from: {address_to_fetch_abi_from})")
return

@@ -38,0 +47,0 @@

@@ -240,2 +240,7 @@ [

"inputs": [],
"name": "ZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "ZeroTeeAddress",

@@ -782,3 +787,3 @@ "type": "error"

{
"internalType": "contract DataAccessTreasuryFactoryBeacon",
"internalType": "contract DataAccessTreasuryProxyFactory",
"name": "initDataAccessTreasuryFactory",

@@ -785,0 +790,0 @@ "type": "address"

@@ -441,3 +441,3 @@ [

"internalType": "address",
"name": "dlpRootCoreAddress",
"name": "initDlpRootCoreAddress",
"type": "address"

@@ -646,3 +646,3 @@ }

"internalType": "address",
"name": "dlpRootCoreAddress",
"name": "newDlpRootCoreAddress",
"type": "address"

@@ -649,0 +649,0 @@ }

@@ -348,3 +348,3 @@ [

{
"internalType": "contract IDLPRegistry",
"internalType": "contract IDLPRootCoreReadOnly",
"name": "",

@@ -427,3 +427,3 @@ "type": "address"

"internalType": "address",
"name": "dlpRootCoreAddress",
"name": "initDlpRootCoreAddress",
"type": "address"

@@ -600,3 +600,3 @@ }

"internalType": "address",
"name": "dlpRootCoreAddress",
"name": "newDlpRootCoreAddress",
"type": "address"

@@ -603,0 +603,0 @@ }

@@ -164,2 +164,7 @@ [

{
"inputs": [],
"name": "ZeroAddress",
"type": "error"
},
{
"anonymous": false,

@@ -238,5 +243,11 @@ "inputs": [

"indexed": false,
"internalType": "bytes",
"name": "metadata",
"type": "bytes"
"internalType": "uint256",
"name": "jobId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "refinerId",
"type": "uint256"
}

@@ -760,8 +771,8 @@ ],

"internalType": "address",
"name": "refinerRegistryAddress",
"name": "initRefinerRegistryAddress",
"type": "address"
},
{
"internalType": "address",
"name": "dataAccessTreasuryFactory",
"internalType": "contract DataAccessTreasuryProxyFactory",
"name": "initDataAccessTreasuryFactory",
"type": "address"

@@ -1010,3 +1021,3 @@ }

"internalType": "address",
"name": "computeEngineAddress",
"name": "newComputeEngineAddress",
"type": "address"

@@ -1024,3 +1035,3 @@ }

"internalType": "uint256",
"name": "_dlpPaymentPercentage",
"name": "newDlpPaymentPercentage",
"type": "uint256"

@@ -1056,3 +1067,3 @@ }

"internalType": "contract IDataAccessTreasury",
"name": "_queryEngineTreasury",
"name": "newQueryEngineTreasury",
"type": "address"

@@ -1070,3 +1081,3 @@ }

"internalType": "address",
"name": "refinerRegistryAddress",
"name": "newRefinerRegistryAddress",
"type": "address"

@@ -1084,3 +1095,3 @@ }

"internalType": "address",
"name": "_vanaTreasury",
"name": "newVanaTreasury",
"type": "address"

@@ -1087,0 +1098,0 @@ }