Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bench #171

Merged
merged 1 commit into from
May 30, 2024
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@msgport/ormp",
"version": "2.1.0",
"version": "2.0.0",
"description": "Oracle and Relayer based Message Protocol",
"repository": "https://github.com/msgport/ORMP",
"author": "Msgport dev",
Expand Down
51 changes: 0 additions & 51 deletions test/ORMP.m.sol

This file was deleted.

11 changes: 4 additions & 7 deletions test/bench/ORMP.b.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import "../../src/eco/Relayer.sol";
contract ORMPBenchmarkTest is Test {
using Chains for uint256;

ORMP ormp = ORMP(0x00000000001523057a05d6293C1e5171eE33eE0A);
Oracle oracle = Oracle(payable(0x0000000003ebeF32D8f0ED406a5CA8805c80AFba));
Relayer relayer = Relayer(payable(0x0000000000808fE9bDCc1d180EfbF5C53552a6b1));
ORMP ormp = ORMP(0xA72d283015c01807bc0788Bf22C1A774bDbFC8fA);
Oracle oracle = Oracle(payable(0x3f938756ceFa33665719Eb528E581FF3f460b7C6));
Relayer relayer = Relayer(payable(0xaC2b224c2E1eD2E8663097a361A05a72d6671C7D));

address immutable self = address(this);
uint256 chain1 = Chains.Darwinia;
Expand Down Expand Up @@ -52,14 +52,11 @@ contract ORMPBenchmarkTest is Test {
}

function perform_recv(Message memory message) public {
bytes32 root = bytes32(0);
uint256 blockNumber = block.number;

vm.createSelectFork(message.toChainId.toChainName());
vm.store(address(oracle), bytes32(uint256(0)), bytes32(uint256(uint160(self))));
assertEq(oracle.owner(), self);
vm.prank(address(oracle.owner()));
oracle.importMessageHash(message.fromChainId, self, blockNumber, root);
oracle.importMessageHash(message.fromChainId, address(ormp), message.index, hash(message));

vm.prank(address(relayer));
ormp.recv(message, "");
Expand Down
Loading