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

Config arbitrum baseFee #73

Merged
merged 5 commits into from
Nov 1, 2023
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Oracle and Relayer based Message Protocol.
|------------|--------------------------------------------|
| ORMP | 0x009D223Aad560e72282db9c0438Ef1ef2bf7703D |
| Oracle | 0x00BD655DDfA7aFeF4BB109FE1F938724527B49D8 |
| Relayer | 0x0065a081a11cc1f6e1692c2A08E9AF36b17973eC |
| Relayer | 0x003605167cd4C36063a7B63e604497e623Bb8B10 |

## Usage
To install with [**Foundry**](https://github.com/gakonst/foundry):
Expand Down
4 changes: 2 additions & 2 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

set -eo pipefail

forge script script/deploy/Deploy.s.sol:Deploy --chain-id 44 --broadcast --verify
forge script script/deploy/Deploy.s.sol:Deploy --chain-id 421614 --broadcast --verify --skip-simulation
# forge script script/deploy/Deploy.s.sol:Deploy --chain-id 44 --broadcast --verify
forge script script/deploy/Deploy.s.sol:Deploy --chain-id 421614 --broadcast --verify # --skip-simulation
2 changes: 1 addition & 1 deletion bin/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eo pipefail
deployer=0x0f14341A7f464320319025540E8Fe48Ad0fe5aec
ormp=0x009D223Aad560e72282db9c0438Ef1ef2bf7703D
oracle=0x00BD655DDfA7aFeF4BB109FE1F938724527B49D8
relayer=0x0065a081a11cc1f6e1692c2A08E9AF36b17973eC
relayer=0x003605167cd4C36063a7B63e604497e623Bb8B10

verify() {
local addr; addr=$1
Expand Down
18 changes: 9 additions & 9 deletions script/deploy/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ contract Deploy is Common {
address immutable ORACLE_ADDR = 0x00BD655DDfA7aFeF4BB109FE1F938724527B49D8;
bytes32 immutable ORACLE_SALT = 0xfbb782802ad938a1df1c89407273c248c1d7af7b4f9e94704564a4ca792a4296;

address immutable RELAYER_ADDR = 0x0065a081a11cc1f6e1692c2A08E9AF36b17973eC;
bytes32 immutable RELAYER_SALT = 0x5f1532f1a200d9076629b2691489b82712c30ba913251eae5871243a0faa5062;
address immutable RELAYER_ADDR = 0x003605167cd4C36063a7B63e604497e623Bb8B10;
bytes32 immutable RELAYER_SALT = 0x5209fea465d02b614816418fde3b910357bae75dbcb0312a9b7a7b83718271cc;

string config;
string instanceId;
Expand Down Expand Up @@ -69,16 +69,16 @@ contract Deploy is Common {
function run() public {
require(deployer == msg.sender, "!deployer");

// deployProtocol();
// deployOralce();
// deployRelayer();
deployProtocol();
deployOralce();
deployRelayer();

setConfig();

// ScriptTools.exportContract(outputName, "DAO", dao);
// ScriptTools.exportContract(outputName, "ORMP", ORMP_ADDR);
// ScriptTools.exportContract(outputName, "ORACLE", ORMP_ADDR);
// ScriptTools.exportContract(outputName, "RELAYER", RELAYER_ADDR);
ScriptTools.exportContract(outputName, "DAO", dao);
ScriptTools.exportContract(outputName, "ORMP", ORMP_ADDR);
ScriptTools.exportContract(outputName, "ORACLE", ORMP_ADDR);
ScriptTools.exportContract(outputName, "RELAYER", RELAYER_ADDR);
}

/// @notice Deploy the protocol
Expand Down
2 changes: 1 addition & 1 deletion script/input/44/fee.c.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"421614": {
"dstPriceRatio": 9000000000000000,
"dstGasPriceInWei": 110000000,
"baseGas": 140000,
"baseGas": 1,
"gasPerByte": 16
}
}
Expand Down
4 changes: 2 additions & 2 deletions script/output/421614/deploy.a-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"DAO": "0x0f14341A7f464320319025540E8Fe48Ad0fe5aec",
"ORACLE": "0x00BD655DDfA7aFeF4BB109FE1F938724527B49D8",
"ORMP": "0x009D223Aad560e72282db9c0438Ef1ef2bf7703D",
"RELAYER": "0x0065a081a11cc1f6e1692c2A08E9AF36b17973eC"
}
"RELAYER": "0x003605167cd4C36063a7B63e604497e623Bb8B10"
}
8 changes: 4 additions & 4 deletions script/output/44/deploy.a-latest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"DAO": "0x0f14341A7f464320319025540E8Fe48Ad0fe5aec",
"ORACLE": "0x00BD655DDfA7aFeF4BB109FE1F938724527B49D8",
"ORMP": "0x009D223Aad560e72282db9c0438Ef1ef2bf7703D",
"RELAYER": "0x0065a081a11cc1f6e1692c2A08E9AF36b17973eC"
}
"ORACLE": "0x0002396F1D52323fcd1ae8079b38808F046882c3",
"RELAYER": "0x003605167cd4C36063a7B63e604497e623Bb8B10",
"ORMP": "0x0034607daf9c1dc6628f6e09E81bB232B6603A89"
}
1 change: 1 addition & 0 deletions src/eco/Relayer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ contract Relayer {
DstPrice memory p = priceOf[toChainId];
DstConfig memory c = configOf[toChainId];

require(c.baseGas != 0, "!baseGas");
// remoteToken = dstGasPriceInWei * (baseGas + extraGas)
uint256 remoteToken = p.dstGasPriceInWei * (c.baseGas + extraGas);
// dstPriceRatio = dstPrice / localPrice * 10^10
Expand Down
4 changes: 2 additions & 2 deletions test/bench/ORMP.b.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract ORMPBenchmarkTest is Test {
using Chains for uint256;

ORMP ormp = ORMP(0x009D223Aad560e72282db9c0438Ef1ef2bf7703D);
Relayer relayer = Relayer(payable(0x0065a081a11cc1f6e1692c2A08E9AF36b17973eC));
Relayer relayer = Relayer(payable(0x003605167cd4C36063a7B63e604497e623Bb8B10));
Oracle oracle = Oracle(payable(0x00BD655DDfA7aFeF4BB109FE1F938724527B49D8));

bytes32 root;
Expand All @@ -54,7 +54,7 @@ contract ORMPBenchmarkTest is Test {
test_recv(fromChainId, toChainId, encoded);
}

function test_recv(uint256 fromChainId, uint256 toChainId, bytes calldata encoded) public {
function test_recv(uint256 fromChainId, uint256 toChainId, bytes calldata encoded) internal {
perform_send(fromChainId, toChainId, encoded);

Message memory message = Message({
Expand Down
Loading