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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## UNRELEASED

* [#1869](https://github.com/crypto-org-chain/cronos/pull/1869) Add missing tx context during vm initialisation

*Sep 4, 2025*

## v1.5.0

### State Machine Breaking

* [#1731](https://github.com/crypto-org-chain/cronos/pull/1804) Upgrade to ibc-go v10.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ replace (
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
// release/v1.15
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20250815065500-a4fbafcae0dd
// develop
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.22.1-0.20250909102334-034803df81c7
// release/v0.22.x
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.22.1-0.20250916025604-a85d8890cd52
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,8 @@ github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241217090828-cfbca9fe8254
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241217090828-cfbca9fe8254/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241217090828-cfbca9fe8254 h1:JzLOFRiKsDtLJt5h0M0jkEIPDKvFFyja7VEp7gG6O9U=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241217090828-cfbca9fe8254/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w=
github.com/crypto-org-chain/ethermint v0.22.1-0.20250909102334-034803df81c7 h1:3DnrW5+m1yKzAHWyQIM1o9MoOzghlDlr3s/GQdQmwu4=
github.com/crypto-org-chain/ethermint v0.22.1-0.20250909102334-034803df81c7/go.mod h1:StA36YNgLruMKlg6FG+fUie0+k3hQS8dapZJzl+CPI4=
github.com/crypto-org-chain/ethermint v0.22.1-0.20250916025604-a85d8890cd52 h1:jmP2dBG1FRNd+GW61zJiy8O4pYGjBCMbPtDZffZ7LBs=
github.com/crypto-org-chain/ethermint v0.22.1-0.20250916025604-a85d8890cd52/go.mod h1:StA36YNgLruMKlg6FG+fUie0+k3hQS8dapZJzl+CPI4=
github.com/crypto-org-chain/go-block-stm v0.0.0-20241213061541-7afe924fb4a6 h1:6KPEi8dWkDSBddQb4NAvEXmNnTXymF3yVeTaT4Hz1iU=
github.com/crypto-org-chain/go-block-stm v0.0.0-20241213061541-7afe924fb4a6/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE=
github.com/crypto-org-chain/go-ethereum v1.10.20-0.20250815065500-a4fbafcae0dd h1:ebSnzvM9yKVGFjvoGly7LFQQCS2HuOWMCvQyByJ52Gs=
Expand Down
4 changes: 2 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ schema = 3
version = "v0.2.2"
hash = "sha256-0MLfSJKdeK3Z7tWAXTdzwB4091dmyxIX38S5SKH5QAw="
[mod."github.com/evmos/ethermint"]
version = "v0.22.1-0.20250909102334-034803df81c7"
hash = "sha256-7JEYNlsLkWO9LPR92ryqx8M+GkXTUrAz5e9sl0iY8Ow="
version = "v0.22.1-0.20250916025604-a85d8890cd52"
hash = "sha256-UbnRRrKkc6nVOEErYg+JKQl9VqoQX2/CWejlGrwrJgI="
replaced = "github.com/crypto-org-chain/ethermint"
[mod."github.com/fatih/color"]
version = "v1.17.0"
Expand Down
17 changes: 17 additions & 0 deletions integration_tests/contracts/contracts/TestBlockTxProperties.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pragma solidity 0.8.21;

contract TestBlockTxProperties {
event TxDetailsEvent(
address indexed origin,
address indexed sender,
uint value,
bytes data,
uint256 price,
uint gas,
bytes4 sig
);

function emitTxDetails() public payable {
emit TxDetailsEvent(tx.origin, msg.sender, msg.value, msg.data, tx.gasprice, gasleft(), msg.sig);
}
}
44 changes: 44 additions & 0 deletions integration_tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,3 +1113,47 @@ def test_tx_replacement(cronos):
{"to": ADDRS["community"], "value": 15, "gasPrice": gas_price},
)
assert "has already been mined" in str(exc)


def test_block_tx_properties(cronos):
"""
test block tx properties on cronos network
- deploy test contract
- call contract
- check all values are correct in log
"""
w3 = cronos.w3
contract = deploy_contract(
w3,
CONTRACTS["TestBlockTxProperties"],
)

tx = contract.functions.emitTxDetails().build_transaction(
{"from": ADDRS["validator"]}
)
receipt = send_transaction(w3, tx)

assert receipt.status == 1
assert len(receipt.logs) == 1

assert contract.address == receipt.logs[0]["address"]
event_signature = HexBytes(
abi.event_signature_to_log_topic(
"TxDetailsEvent(address,address,uint256,bytes,uint256,uint256,bytes4)"
)
)
assert event_signature == receipt.logs[0]["topics"][0]
validator_hex_address = HexBytes(b"\x00" * 12 + HexBytes(ADDRS["validator"]))
assert validator_hex_address == receipt.logs[0]["topics"][1]
assert validator_hex_address == receipt.logs[0]["topics"][2]

# check event values
tx_details_event = contract.events.TxDetailsEvent().process_receipt(receipt)
data = tx_details_event[0]["args"]
assert data["origin"] == ADDRS["validator"]
assert data["sender"] == ADDRS["validator"]
assert data["value"] == 0
assert data["data"] == bytes.fromhex("8e091b5e")
assert data["price"] > 0
assert data["gas"] == 3633
assert data["sig"] == bytes.fromhex("8e091b5e")
1 change: 1 addition & 0 deletions integration_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"TestICA": "TestICA.sol",
"Random": "Random.sol",
"TestRelayer": "TestRelayer.sol",
"TestBlockTxProperties": "TestBlockTxProperties.sol",
}


Expand Down
Loading