Skip to content

Commit

Permalink
Fix ibc commitments (#45)
Browse files Browse the repository at this point in the history
* change storage key

Signed-off-by: Naohiro Yoshida <[email protected]>
  • Loading branch information
yoshidan authored Aug 27, 2024
1 parent 1a8c8cf commit a2d85a8
Show file tree
Hide file tree
Showing 8 changed files with 266 additions and 324 deletions.
2 changes: 1 addition & 1 deletion e2e/contracts/contracts/Dependencies.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {IBCChannelPacketTimeout} from
"@hyperledger-labs/yui-ibc-solidity/contracts/core/04-channel/IBCChannelPacketTimeout.sol";
import {
IBCChannelUpgradeInitTryAck,
IBCChannelUpgradeConfirmTimeoutCancel
IBCChannelUpgradeConfirmOpenTimeoutCancel
} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/04-channel/IBCChannelUpgrade.sol";
import {IIBCHandler} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/25-handler/IIBCHandler.sol";
import {OwnableIBCHandler} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/25-handler/OwnableIBCHandler.sol";
Expand Down
6 changes: 3 additions & 3 deletions e2e/contracts/contracts/clients/ParliaClient.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ IbcLightclientsParliaV1ConsensusState as ConsensusState,
IbcLightclientsParliaV1Header as Header
} from "../ibc/lightclients/parlia/v1/parlia.sol";
import {GoogleProtobufAny as Any} from "@hyperledger-labs/yui-ibc-solidity/contracts/proto/GoogleProtobufAny.sol";
import "solidity-rlp/contracts/Helper.sol";
import "solidity-mpt/src/MPTProof.sol";
import {RLPReader} from "@hyperledger-labs/yui-ibc-solidity/contracts/clients/qbft/RLPReader.sol";
import {MPTProof} from "@hyperledger-labs/yui-ibc-solidity/contracts/clients/qbft/MPTProof.sol";

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

uint256 private constant COMMITMENT_SLOT = 0;
bytes32 private constant COMMITMENT_SLOT = 0x1ee222554989dda120e26ecacf756fe1235cd8d726706b57517715dde4f0c900;
uint8 private constant ACCOUNT_STORAGE_ROOT_INDEX = 2;

address internal ibcHandler;
Expand Down
6 changes: 3 additions & 3 deletions e2e/contracts/migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const IBCChannelHandshake = artifacts.require("IBCChannelHandshake");
const IBCChannelPacketSendRecv = artifacts.require("IBCChannelPacketSendRecv");
const IBCChannelPacketTimeout = artifacts.require("IBCChannelPacketTimeout");
const IBCChannelUpgradeInitTryAck = artifacts.require("IBCChannelUpgradeInitTryAck");
const IBCChannelUpgradeConfirmTimeoutCancel = artifacts.require("IBCChannelUpgradeConfirmTimeoutCancel");
const IBCChannelUpgradeConfirmOpenTimeoutCancel = artifacts.require("IBCChannelUpgradeConfirmOpenTimeoutCancel");
const IBCHandler = artifacts.require("OwnableIBCHandler");
const ERC20Token = artifacts.require("ERC20Token");
const ICS20TransferBank = artifacts.require("ICS20TransferBank");
Expand All @@ -18,15 +18,15 @@ module.exports = async function (deployer) {
await deployer.deploy(IBCChannelPacketSendRecv);
await deployer.deploy(IBCChannelPacketTimeout);
await deployer.deploy(IBCChannelUpgradeInitTryAck);
await deployer.deploy(IBCChannelUpgradeConfirmTimeoutCancel);
await deployer.deploy(IBCChannelUpgradeConfirmOpenTimeoutCancel);
await deployer.deploy(IBCHandler,
IBCClient.address,
IBCConnection.address,
IBCChannelHandshake.address,
IBCChannelPacketSendRecv.address,
IBCChannelPacketTimeout.address,
IBCChannelUpgradeInitTryAck.address,
IBCChannelUpgradeConfirmTimeoutCancel.address,
IBCChannelUpgradeConfirmOpenTimeoutCancel.address,
);

await deployer.deploy(ParliaClient, IBCHandler.address);
Expand Down
Loading

0 comments on commit a2d85a8

Please sign in to comment.