Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6aa49b3
Add ForceChangeLockedAccount functionality and related event processi…
purplesmoke05 Jun 26, 2025
8a75b75
Replace aiohttp with requests in batch processing modules (25.9) (#1654)
purplesmoke05 Jun 27, 2025
ca5bd6c
Update transfer tests and models to include 'ibet_wst_bridge' message…
purplesmoke05 Jul 1, 2025
0ab8254
Bump hardhat from 2.25.0 to 2.26.1 (#1656)
dependabot[bot] Jul 21, 2025
1309456
Add reallocation functionality to transfer process (#1659)
purplesmoke05 Jul 23, 2025
349063e
Refactor lock and transfer data models to remove deprecated inheritan…
purplesmoke05 Jul 24, 2025
a2a25d2
Add watchers for ChangeToRedeemed and ChangeToCanceled events with no…
purplesmoke05 Jul 30, 2025
e0f9f42
Fix balance indexing (#1664)
YoshihitoAso Jul 31, 2025
c79b0c3
Add notification category to Notification model and implement attribu…
purplesmoke05 Jul 31, 2025
c17585c
Bump hardhat from 2.26.1 to 2.26.2 (#1665)
dependabot[bot] Aug 12, 2025
9e3fe67
Bump actions/checkout from 4 to 5 (#1666)
dependabot[bot] Aug 12, 2025
704b12f
Bump actions/download-artifact from 4 to 5 (#1667)
dependabot[bot] Aug 12, 2025
0086a40
Bump MishaKav/pytest-coverage-comment from 1.1.54 to 1.1.56 (#1668)
dependabot[bot] Aug 12, 2025
a9745c2
Refactor transaction retrieval to handle pruned transactions and impr…
purplesmoke05 Aug 18, 2025
6e2ff8e
Update hardhat to version 2.26.3 and adjust versioning in package fil…
purplesmoke05 Aug 19, 2025
53ff50e
Add retry mechanism to HTTP requests in company_list/token_list/accou…
purplesmoke05 Sep 2, 2025
2c7aa0d
Bump MishaKav/pytest-coverage-comment from 1.1.56 to 1.1.57 (#1676)
dependabot[bot] Sep 2, 2025
593ab72
Bump dependencies: fastapi to 0.116.1, requests to 2.32.5, and urllib…
purplesmoke05 Sep 2, 2025
f208c95
Bump hardhat from 2.26.2 to 2.26.3 (#1678)
dependabot[bot] Sep 2, 2025
000eb4c
Bump actions/setup-node from 4 to 5 (#1680)
dependabot[bot] Sep 8, 2025
436477b
Cherrypick 1682 (v25.9) (#1683)
YoshihitoAso Sep 9, 2025
076e7da
Bump starlette from 0.46.2 to 0.47.3 and update revision in uv.lock (…
purplesmoke05 Sep 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ jobs:
name: 'Build docker image'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/setup-test-image
lint-ruff:
name: 'Lint check (ruff)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: astral-sh/ruff-action@v3
unit-test:
name: 'Unit tests'
Expand All @@ -27,7 +27,7 @@ jobs:
'tests/batch/',
]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/setup-test-image
- name: build image on compose
run: docker compose build
Expand Down Expand Up @@ -59,15 +59,15 @@ jobs:
packages: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/setup-test-image
- name: build image on compose
run: docker compose build
- name: Change owner of output directory
run: |
sudo chown runner:docker /home/runner/work/ibet-Wallet-API/ibet-Wallet-API/cov
sudo chmod 777 /home/runner/work/ibet-Wallet-API/ibet-Wallet-API/cov
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
pattern: '.coverage-*'
path: cov/
Expand All @@ -76,12 +76,12 @@ jobs:
run: docker compose run -w /app/ibet-Wallet-API/cov ibet-wallet-api-postgres bash --login -c 'uv run coverage combine .coverage-*'
- name: generate coverage xml file
run: docker compose run -w /app/ibet-Wallet-API ibet-wallet-api-postgres bash --login -c 'uv run coverage xml --data-file=cov/.coverage -o cov/coverage.xml'
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
pattern: 'pytest-*'
path: cov/
merge-multiple: true
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: 20
- name: Install junit-report-merger
Expand All @@ -90,7 +90,7 @@ jobs:
run: jrm cov/pytest.xml "cov/pytest-*.xml"
- name: Pytest coverage comment
id: coverageComment
uses: MishaKav/pytest-coverage-comment@13d3c18e21895566c746187c9ea74736372e5e91 # v1.1.54
uses: MishaKav/pytest-coverage-comment@1bdbba85fb74a2fdc1ec66383acec1091610f82b # v1.1.57
with:
report-only-changed-files: true
pytest-xml-coverage-path: cov/coverage.xml
Expand All @@ -115,7 +115,7 @@ jobs:
matrix:
db: [postgres, mysql]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ./.github/actions/setup-test-image
- name: run unit test using ${{ matrix.db }}
run: docker compose run ibet-wallet-api-${{ matrix.db }} bash --login -c "cd /app/ibet-Wallet-API && uv run pytest -vv --test-alembic -m 'alembic'"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ibet Wallet API

<p>
<img alt="Version" src="https://img.shields.io/badge/version-25.6-blue.svg?cacheSeconds=2592000" />
<img alt="Version" src="https://img.shields.io/badge/version-25.9-blue.svg?cacheSeconds=2592000" />
<img alt="License: Apache--2.0" src="https://img.shields.io/badge/License-Apache--2.0-yellow.svg" />
</p>

Expand Down
2 changes: 1 addition & 1 deletion README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ibet Wallet API

<p>
<img alt="Version" src="https://img.shields.io/badge/version-25.6-blue.svg?cacheSeconds=2592000" />
<img alt="Version" src="https://img.shields.io/badge/version-25.9-blue.svg?cacheSeconds=2592000" />
<img alt="License: Apache--2.0" src="https://img.shields.io/badge/License-Apache--2.0-yellow.svg" />
</p>

Expand Down
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
SPDX-License-Identifier: Apache-2.0
"""

__version__ = "25.6.0"
__version__ = "25.9.0"
10 changes: 5 additions & 5 deletions app/api/routers/eth.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from rlp import decode
from sqlalchemy import select
from web3.exceptions import ContractLogicError, TimeExhausted, Web3RPCError
from web3.types import TxReceipt
from web3.types import BlockIdentifier, TxReceipt

from app import config, log
from app.contracts import AsyncContract
Expand Down Expand Up @@ -286,7 +286,7 @@ async def send_raw_transaction(
)
if tx["status"] == 0:
# inspect reason of transaction fail
err_msg = await inspect_tx_failure(tx_hash)
err_msg = await inspect_tx_failure(tx_hash, tx["blockNumber"])
code, message = error_code_msg(err_msg)
result.append(
{
Expand Down Expand Up @@ -518,7 +518,7 @@ async def wait_for_transaction_receipt(
)
if tx["status"] == 0:
# Inspect reason of transaction fail.
err_msg = await inspect_tx_failure(transaction_hash)
err_msg = await inspect_tx_failure(transaction_hash, tx["blockNumber"])
code, message = error_code_msg(err_msg)
result["status"] = 0
result["error_code"] = code
Expand All @@ -531,8 +531,8 @@ async def wait_for_transaction_receipt(
return json_response({**SuccessResponse.default(), "data": result})


async def inspect_tx_failure(tx_hash: HexBytes) -> str:
tx = await async_web3.eth.get_transaction(tx_hash)
async def inspect_tx_failure(tx_hash: HexBytes, block_number: BlockIdentifier) -> str:
tx = await AsyncContract.get_transaction(tx_hash, block_number)

# build a new transaction to replay:
replay_tx = {
Expand Down
3 changes: 3 additions & 0 deletions app/api/routers/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ async def list_all_notifications(
"""
Returns notifications filtered by given query.
"""
notification_category = request_query.notification_category
address = request_query.address
notification_type = request_query.notification_type
priority = request_query.priority
Expand All @@ -75,6 +76,8 @@ async def list_all_notifications(
)

# Search Filter
if notification_category is not None:
stmt = stmt.where(Notification.notification_category == notification_category)
if address is not None:
stmt = stmt.where(Notification.address == to_checksum_address(address))
if notification_type is not None:
Expand Down
32 changes: 30 additions & 2 deletions app/contracts/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@
"""

import json
from typing import Type, TypeVar
from typing import Any, Never, Type, TypeVar

from eth_utils import to_checksum_address
from hexbytes import HexBytes
from web3 import contract
from web3.contract.async_contract import AsyncContractEvents
from web3.eth.async_eth import AsyncContract as Web3AsyncContract
from web3.exceptions import BadFunctionCallOutput, ContractLogicError
from web3.exceptions import (
BadFunctionCallOutput,
ContractLogicError,
TransactionNotFound,
)
from web3.types import BlockIdentifier, TxData

from app.utils.web3_utils import AsyncWeb3Wrapper

Expand Down Expand Up @@ -134,3 +140,25 @@ async def call_function(
raise exc

return result

@staticmethod
async def get_transaction(
transaction_hash: HexBytes, block_number: BlockIdentifier
) -> TxData | dict[Any, Never]:
"""Get transaction

:param transaction_hash: Transaction hash
:param block_number: Block number
:return: Return the transaction data or empty dict
"""
tx = {}
try:
tx = await async_web3.eth.get_transaction(transaction_hash)
except TransactionNotFound:
# Retrieve transaction from block data when node has pruned old transaction
block = await async_web3.eth.get_block(block_number, full_transactions=True)
for transaction in block.get("transactions", []):
if transaction.get("hash") == transaction_hash:
tx = transaction
break
return tx
70 changes: 70 additions & 0 deletions app/contracts/json/IbetSecurityTokenInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,43 @@
"name": "ChangeTransferApprovalRequired",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "lockAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "beforeAccountAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "afterAccountAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "data",
"type": "string"
}
],
"name": "ForceChangeLockedAccount",
"type": "event"
},
{
"anonymous": false,
"inputs": [
Expand Down Expand Up @@ -726,6 +763,39 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_lockAddress",
"type": "address"
},
{
"internalType": "address",
"name": "_beforeAccountAddress",
"type": "address"
},
{
"internalType": "address",
"name": "_afterAccountAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "_value",
"type": "uint256"
},
{
"internalType": "string",
"name": "_data",
"type": "string"
}
],
"name": "forceChangeLockedAccount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down
74 changes: 72 additions & 2 deletions app/contracts/json/IbetShare.json

Large diffs are not rendered by default.

74 changes: 72 additions & 2 deletions app/contracts/json/IbetStraightBond.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async def lifespan(_: FastAPI):
title="ibet Wallet API",
description="RPC services that provides utility tools for building a wallet system on ibet network",
terms_of_service="",
version="25.6.0",
version="25.9.0",
contact={"email": "dev@boostry.co.jp"},
license_info={
"name": "Apache 2.0",
Expand Down
11 changes: 8 additions & 3 deletions app/model/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from .idx_agreement import AgreementStatus, IDXAgreement
from .idx_block_data import IDXBlockData, IDXBlockDataBlockNumber
from .idx_consume_coupon import IDXConsumeCoupon
from .idx_lock_unlock import IDXLock, IDXUnlock
from .idx_lock_unlock import IDXLock, IDXUnlock, LockDataMessage, UnlockDataMessage
from .idx_order import IDXOrder
from .idx_position import (
IDXLockedPosition,
Expand All @@ -42,17 +42,22 @@
)
from .idx_token_list_register import IDXTokenListBlockNumber, IDXTokenListRegister
from .idx_transfer import (
DataMessage,
IDXTransfer,
IDXTransferBlockNumber,
IDXTransferSourceEventType,
TransferDataMessage,
)
from .idx_transfer_approval import IDXTransferApproval, IDXTransferApprovalBlockNumber
from .idx_tx_data import IDXTxData
from .listing import Listing
from .messaging import ChatWebhook, Mail
from .node import Node
from .notification import Notification, NotificationBlockNumber, NotificationType
from .notification import (
Notification,
NotificationAttributeValue,
NotificationBlockNumber,
NotificationType,
)
from .public_info import PublicAccountList, TokenList
from .tokenholders import TokenHolder, TokenHolderBatchStatus, TokenHoldersList
from .user_info import AccountTag
Loading
Loading