move core bridge address to constructor

This commit is contained in:
diop 2022-12-06 14:47:56 +00:00
parent 56dc6f2019
commit 0a51e176fd
6 changed files with 11 additions and 2348 deletions

@ -1 +1 @@
Subproject commit e734b42fc2245b520372bca0099870f40f1e6f38
Subproject commit 206a2394481ec1af16d0e0acf216bbffedde405b

View File

@ -4,7 +4,7 @@ Simple messeger project that sends a "hellom, world!" message between EVM, Solan
### Dependencies
This project uses Foundry to compile and deploy EVM contracts. You can find install instructions at [https://getfoundry.sh](https://getfoundry.sh)
<br><br>
<br>
The javascript dependencies can be installed via npm install in this folder.

View File

@ -5,17 +5,19 @@ import "./Wormhole/IWormhole.sol";
contract Messenger {
string private current_msg;
address private wormhole_core_bridge_address = address(0xC89Ce4735882C9F0f0FE26686c53074E09B0D550);
IWormhole core_bridge = IWormhole(wormhole_core_bridge_address);
address private wormhole_core_bridge_address;
uint32 nonce = 0;
mapping(uint16 => bytes32) _applicationContracts;
address owner;
mapping(bytes32 => bool) _completedMessages;
constructor(){
constructor(address _core_bridge_address){
owner = msg.sender;
wormhole_core_bridge_address = _core_bridge_address;
}
IWormhole core_bridge = IWormhole(wormhole_core_bridge_address);
function sendMsg(bytes memory str) public returns (uint64 sequence) {
sequence = core_bridge.publishMessage(nonce, str, 1);
nonce = nonce+1;

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
Subproject commit 2c7cbfc6fbede6d7c9e6b17afe997e3fdfe22fef
Subproject commit bd533b5ed42c6e45d81ab5a460981256cb5a76e4

@ -1 +1 @@
Subproject commit 2dc086563f2e51620ebc43d2237fc10ef201c4e6
Subproject commit 206a2394481ec1af16d0e0acf216bbffedde405b