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(evm): avoid public functions in libraries #821

Merged
merged 1 commit into from
Oct 17, 2023
Merged
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
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