Skip to content

Commit

Permalink
use chain id to address evm state machines (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizdave97 authored Aug 2, 2024
1 parent 422aa39 commit 9fe84f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 49 deletions.
51 changes: 3 additions & 48 deletions interfaces/StateMachine.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,8 @@ library StateMachine {
return bytes(string.concat("KUSAMA-", Strings.toString(id)));
}

// @notice Address the ethereum "execution layer"
function ethereum() internal pure returns (bytes memory) {
return bytes("ETH-EXEC");
}

// @notice Address the Polygon POS state machine
function polygon() internal pure returns (bytes memory) {
return bytes("POLY");
}

// @notice Address the Binance smart chain state machine
function bsc() internal pure returns (bytes memory) {
return bytes("BSC");
}

// @notice Address the Arbitrum state machine
function arbitrum() internal pure returns (bytes memory) {
return bytes("ETH-ARBI");
}

// @notice Address the Optimism state machine
function optimism() internal pure returns (bytes memory) {
return bytes("ETH-OPTI");
}

// @notice Address the Base state machine
function base() internal pure returns (bytes memory) {
return bytes("ETH-BASE");
}

// @notice Address the Blast state machine
function blast() internal pure returns (bytes memory) {
return bytes("ETH-BLST");
}

// @notice Address the Mantle machine
function mantle() internal pure returns (bytes memory) {
return bytes("ETH-MNTL");
}

// @notice Address the Manta machine
function manta() internal pure returns (bytes memory) {
return bytes("ETH-MNTA");
}

// @notice Address the Build on Bitcoin machine
function bob() internal pure returns (bytes memory) {
return bytes("ETH-BOB");
// @notice Address an evm state machine
function evm(uint chainid) internal pure returns (bytes memory) {
return bytes(string.concat("EVM-", Strings.toString(chainid)));
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polytope-labs/ismp-solidity",
"version": "0.3.1",
"version": "0.3.2",
"description": "Hyperbridge Solidity SDK for the Interoperable state machine protocol",
"author": "Polytope Labs <[email protected]>",
"license": "Apache-2.0",
Expand Down

0 comments on commit 9fe84f5

Please sign in to comment.