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

Chore: fix compiler warnings #39

Merged
merged 1 commit into from
Jan 17, 2024
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
16 changes: 8 additions & 8 deletions src/domains/Domain.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ contract Domain {
vm.makePersistent(address(this));
}

function readConfigString(string memory key) public returns (string memory) {
function readConfigString(string memory key) public view returns (string memory) {
return config.readString(string.concat(".domains.", _details.chainAlias, ".", key));
}

function readConfigAddress(string memory key) public returns (address) {
function readConfigAddress(string memory key) public view returns (address) {
return config.readAddress(string.concat(".domains.", _details.chainAlias, ".", key));
}

function readConfigUint(string memory key) public returns (uint256) {
function readConfigUint(string memory key) public view returns (uint256) {
return config.readUint(string.concat(".domains.", _details.chainAlias, ".", key));
}

function readConfigInt(string memory key) public returns (int256) {
function readConfigInt(string memory key) public view returns (int256) {
return config.readInt(string.concat(".domains.", _details.chainAlias, ".", key));
}

function readConfigBytes32(string memory key) public returns (bytes32) {
function readConfigBytes32(string memory key) public view returns (bytes32) {
return config.readBytes32(string.concat(".domains.", _details.chainAlias, ".", key));
}

Expand All @@ -67,7 +67,7 @@ contract Domain {
return out;
}

function readConfigBytes32FromString(string memory key) public returns (bytes32) {
function readConfigBytes32FromString(string memory key) public view returns (bytes32) {
return bytesToBytes32(bytes(readConfigString(key)));
}

Expand All @@ -82,12 +82,12 @@ contract Domain {
function details() public view returns (StdChains.Chain memory) {
return _details;
}

function selectFork() public {
vm.selectFork(forkId);
require(block.chainid == _details.chainId, string(abi.encodePacked(_details.chainAlias, " is pointing to the wrong RPC endpoint '", _details.rpcUrl, "'")));
}

function rollFork(uint256 blocknum) public {
vm.rollFork(forkId, blocknum);
}
Expand Down