Skip to content

Commit a2d85a8

Browse files
authored
Fix ibc commitments (#45)
* change storage key Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
1 parent 1a8c8cf commit a2d85a8

File tree

8 files changed

+266
-324
lines changed

8 files changed

+266
-324
lines changed

e2e/contracts/contracts/Dependencies.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {IBCChannelPacketTimeout} from
1111
"@hyperledger-labs/yui-ibc-solidity/contracts/core/04-channel/IBCChannelPacketTimeout.sol";
1212
import {
1313
IBCChannelUpgradeInitTryAck,
14-
IBCChannelUpgradeConfirmTimeoutCancel
14+
IBCChannelUpgradeConfirmOpenTimeoutCancel
1515
} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/04-channel/IBCChannelUpgrade.sol";
1616
import {IIBCHandler} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/25-handler/IIBCHandler.sol";
1717
import {OwnableIBCHandler} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/25-handler/OwnableIBCHandler.sol";

e2e/contracts/contracts/clients/ParliaClient.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ IbcLightclientsParliaV1ConsensusState as ConsensusState,
1010
IbcLightclientsParliaV1Header as Header
1111
} from "../ibc/lightclients/parlia/v1/parlia.sol";
1212
import {GoogleProtobufAny as Any} from "@hyperledger-labs/yui-ibc-solidity/contracts/proto/GoogleProtobufAny.sol";
13-
import "solidity-rlp/contracts/Helper.sol";
14-
import "solidity-mpt/src/MPTProof.sol";
13+
import {RLPReader} from "@hyperledger-labs/yui-ibc-solidity/contracts/clients/qbft/RLPReader.sol";
14+
import {MPTProof} from "@hyperledger-labs/yui-ibc-solidity/contracts/clients/qbft/MPTProof.sol";
1515

1616
contract ParliaClient is ILightClient {
1717
using MPTProof for bytes;
@@ -30,7 +30,7 @@ contract ParliaClient is ILightClient {
3030
bytes32 private constant CONSENSUS_STATE_TYPE_URL_HASH =
3131
keccak256(abi.encodePacked(CONSENSUS_STATE_TYPE_URL));
3232

33-
uint256 private constant COMMITMENT_SLOT = 0;
33+
bytes32 private constant COMMITMENT_SLOT = 0x1ee222554989dda120e26ecacf756fe1235cd8d726706b57517715dde4f0c900;
3434
uint8 private constant ACCOUNT_STORAGE_ROOT_INDEX = 2;
3535

3636
address internal ibcHandler;

e2e/contracts/migrations/2_deploy_contracts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const IBCChannelHandshake = artifacts.require("IBCChannelHandshake");
44
const IBCChannelPacketSendRecv = artifacts.require("IBCChannelPacketSendRecv");
55
const IBCChannelPacketTimeout = artifacts.require("IBCChannelPacketTimeout");
66
const IBCChannelUpgradeInitTryAck = artifacts.require("IBCChannelUpgradeInitTryAck");
7-
const IBCChannelUpgradeConfirmTimeoutCancel = artifacts.require("IBCChannelUpgradeConfirmTimeoutCancel");
7+
const IBCChannelUpgradeConfirmOpenTimeoutCancel = artifacts.require("IBCChannelUpgradeConfirmOpenTimeoutCancel");
88
const IBCHandler = artifacts.require("OwnableIBCHandler");
99
const ERC20Token = artifacts.require("ERC20Token");
1010
const ICS20TransferBank = artifacts.require("ICS20TransferBank");
@@ -18,15 +18,15 @@ module.exports = async function (deployer) {
1818
await deployer.deploy(IBCChannelPacketSendRecv);
1919
await deployer.deploy(IBCChannelPacketTimeout);
2020
await deployer.deploy(IBCChannelUpgradeInitTryAck);
21-
await deployer.deploy(IBCChannelUpgradeConfirmTimeoutCancel);
21+
await deployer.deploy(IBCChannelUpgradeConfirmOpenTimeoutCancel);
2222
await deployer.deploy(IBCHandler,
2323
IBCClient.address,
2424
IBCConnection.address,
2525
IBCChannelHandshake.address,
2626
IBCChannelPacketSendRecv.address,
2727
IBCChannelPacketTimeout.address,
2828
IBCChannelUpgradeInitTryAck.address,
29-
IBCChannelUpgradeConfirmTimeoutCancel.address,
29+
IBCChannelUpgradeConfirmOpenTimeoutCancel.address,
3030
);
3131

3232
await deployer.deploy(ParliaClient, IBCHandler.address);

0 commit comments

Comments
 (0)