Skip to content

Commit ff59deb

Browse files
authored
Merge pull request #40 from veithly/fix/chainbase
Refactor imports in __init__.py to use relative paths and enhance readability.
2 parents b932c07 + 4425683 commit ff59deb

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

spoon_toolkits/data_platforms/chainbase/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
dotenv.load_dotenv()
66

77
# Import all module servers
8-
from balance import mcp as balance_server
9-
from basic import mcp as basic_server
10-
from token_api import mcp as token_api_server
8+
from .balance import mcp as balance_server
9+
from .basic import mcp as basic_server
10+
from .token_api import mcp as token_api_server
1111

1212
# Import tool classes
13-
from chainbase_tools import (
13+
from .chainbase_tools import (
1414
GetLatestBlockNumberTool,
1515
GetBlockByNumberTool,
1616
GetTransactionByHashTool,
@@ -62,4 +62,4 @@
6262
host=host,
6363
port=port,
6464
path=path
65-
)
65+
)

spoon_toolkits/data_platforms/chainbase/chainbase_tools.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,10 @@ class ContractCallTool(BaseTool):
225225
},
226226
"params": {
227227
"type": "array",
228-
"description": "The parameters to pass to the function"
228+
"description": "The parameters to pass to the function",
229+
"items": {
230+
"type": "string"
231+
}
229232
},
230233
"to_block": {
231234
"type": "string",
@@ -505,4 +508,4 @@ async def run_all_tests():
505508
await test_get_account_tokens()
506509
await test_get_account_balance()
507510

508-
asyncio.run(run_all_tests())
511+
asyncio.run(run_all_tests())

0 commit comments

Comments
 (0)