Skip to content

Commit

Permalink
fix(evm): avoid public functions in libraries (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen authored Oct 17, 2023
2 parents dbaf4ae + 5eed7e5 commit 5482a61
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions evm/contracts/apps/ucs/01-relay/Relay.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ library RelayLib {
string memory portId,
string memory channelId,
string memory denom
) public pure returns (bool) {
) internal pure returns (bool) {
return
bytes(denom).length > 0 &&
denom.startsWith(makeDenomPrefix(portId, channelId));
Expand All @@ -44,15 +44,15 @@ library RelayLib {
function makeDenomPrefix(
string memory portId,
string memory channelId
) public pure returns (string memory) {
) internal pure returns (string memory) {
return string(abi.encodePacked(portId, "/", channelId, "/"));
}

function makeForeignDenom(
string memory portId,
string memory channelId,
string memory denom
) public pure returns (string memory) {
) internal pure returns (string memory) {
return
string(abi.encodePacked(makeDenomPrefix(portId, channelId), denom));
}
Expand Down Expand Up @@ -92,13 +92,13 @@ library RelayLib {
library RelayPacketLib {
function encode(
RelayPacket memory packet
) public pure returns (bytes memory) {
) internal pure returns (bytes memory) {
return abi.encode(packet.sender, packet.receiver, packet.tokens);
}

function decode(
bytes memory packet
) public pure returns (RelayPacket memory) {
) internal pure returns (RelayPacket memory) {
(
string memory sender,
string memory receiver,
Expand Down

0 comments on commit 5482a61

Please sign in to comment.