Skip to content

Commit

Permalink
mark functions as external
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Dec 13, 2022
1 parent 84aeef0 commit c475044
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions contracts/SoulLinker.sol
Expand Up @@ -123,13 +123,13 @@ contract SoulLinker is PaymentGateway, EIP712, Pausable, ReentrancyGuard {

/// @notice Pauses the smart contract
/// @dev The caller must have the owner to call this function
function pause() public onlyOwner {
function pause() external onlyOwner {
_pause();
}

/// @notice Unpauses the smart contract
/// @dev The caller must have the owner to call this function
function unpause() public onlyOwner {
function unpause() external onlyOwner {
_unpause();
}

Expand Down Expand Up @@ -311,7 +311,7 @@ contract SoulLinker is PaymentGateway, EIP712, Pausable, ReentrancyGuard {
address token,
uint256 tokenId,
uint256 readerIdentityId
) public view returns (uint256[] memory) {
) external view returns (uint256[] memory) {
return _permissionSignatureDates[token][tokenId][readerIdentityId];
}

Expand All @@ -326,7 +326,7 @@ contract SoulLinker is PaymentGateway, EIP712, Pausable, ReentrancyGuard {
uint256 tokenId,
uint256 readerIdentityId,
uint256 signatureDate
) public view returns (PermissionData memory) {
) external view returns (PermissionData memory) {
return _permissions[token][tokenId][readerIdentityId][signatureDate];
}

Expand Down Expand Up @@ -374,7 +374,7 @@ contract SoulLinker is PaymentGateway, EIP712, Pausable, ReentrancyGuard {
/// @return price Current price of storing a permission
/// @return paymentMethodUsed Address of the token used to pay
function getPriceForAddPermission(address paymentMethod)
public
external
view
returns (uint256 price, address paymentMethodUsed)
{
Expand Down
4 changes: 2 additions & 2 deletions contracts/SoulName.sol
Expand Up @@ -116,7 +116,7 @@ contract SoulName is MasaNFT, ISoulName, ReentrancyGuard {
string memory name,
uint256 yearsPeriod,
string memory _tokenURI
) public override nonReentrant returns (uint256) {
) external override nonReentrant returns (uint256) {
require(isAvailable(name), "NAME_ALREADY_EXISTS");
require(bytes(name).length > 0, "ZERO_LENGTH_NAME");
require(yearsPeriod > 0, "ZERO_YEARS_PERIOD");
Expand Down Expand Up @@ -349,7 +349,7 @@ contract SoulName is MasaNFT, ISoulName, ReentrancyGuard {
/// @param name Name of the soul name
/// @return URI of the soulname associated to a name
function tokenURI(string memory name)
public
external
view
virtual
returns (string memory)
Expand Down
2 changes: 1 addition & 1 deletion contracts/SoulStore.sol
Expand Up @@ -189,7 +189,7 @@ contract SoulStore is PaymentGateway, Pausable, ReentrancyGuard {
address paymentMethod,
string memory name,
uint256 yearsPeriod
) public view returns (uint256) {
) external view returns (uint256) {
uint256 mintingPrice = getNameRegistrationPricePerYear(name).mul(
yearsPeriod
);
Expand Down
2 changes: 1 addition & 1 deletion contracts/Soulbound2FA.sol
Expand Up @@ -92,7 +92,7 @@ contract Soulbound2FA is MasaSBTSelfSovereign, ReentrancyGuard {
address authorityAddress,
uint256 signatureDate,
bytes calldata signature
) public payable virtual returns (uint256) {
) external payable virtual returns (uint256) {
uint256 identityId = soulboundIdentity.tokenOfOwner(to);

return
Expand Down
2 changes: 1 addition & 1 deletion contracts/SoulboundCreditScore.sol
Expand Up @@ -93,7 +93,7 @@ contract SoulboundCreditScore is MasaSBTSelfSovereign, ReentrancyGuard {
address authorityAddress,
uint256 signatureDate,
bytes calldata signature
) public payable virtual returns (uint256) {
) external payable virtual returns (uint256) {
uint256 identityId = soulboundIdentity.tokenOfOwner(to);

return
Expand Down
14 changes: 7 additions & 7 deletions contracts/SoulboundIdentity.sol
Expand Up @@ -67,7 +67,7 @@ contract SoulboundIdentity is
string memory name,
uint256 yearsPeriod,
string memory _tokenURI
) public override soulNameAlreadySet nonReentrant returns (uint256) {
) external override soulNameAlreadySet nonReentrant returns (uint256) {
uint256 identityId = mint(to);
soulName.mint(to, name, yearsPeriod, _tokenURI);

Expand All @@ -79,14 +79,14 @@ contract SoulboundIdentity is
/// @notice Returns the address of the SoulName contract linked to this identity
/// @dev This function returns the address of the SoulName contract linked to this identity
/// @return Address of the SoulName contract
function getSoulName() public view override returns (ISoulName) {
function getSoulName() external view override returns (ISoulName) {
return soulName;
}

/// @notice Returns the extension of the soul name
/// @dev This function returns the extension of the soul name
/// @return Extension of the soul name
function getExtension() public view returns (string memory) {
function getExtension() external view returns (string memory) {
return soulName.getExtension();
}

Expand All @@ -108,7 +108,7 @@ contract SoulboundIdentity is
/// @param name Name of the soul name
/// @return Address of the owner of the identity
function ownerOf(string memory name)
public
external
view
soulNameAlreadySet
returns (address)
Expand All @@ -122,7 +122,7 @@ contract SoulboundIdentity is
/// @param name Name of the soul name
/// @return URI of the identity associated to a soul name
function tokenURI(string memory name)
public
external
view
soulNameAlreadySet
returns (string memory)
Expand All @@ -135,7 +135,7 @@ contract SoulboundIdentity is
/// @dev This function returns the token URI of the identity owned by an account
/// @param owner Address of the owner of the identity
/// @return URI of the identity owned by the account
function tokenURI(address owner) public view returns (string memory) {
function tokenURI(address owner) external view returns (string memory) {
uint256 tokenId = tokenOfOwner(owner);
return super.tokenURI(tokenId);
}
Expand All @@ -158,7 +158,7 @@ contract SoulboundIdentity is
/// @param name Name of the soul name
/// @return available `true` if the soul name is available, `false` otherwise
function isAvailable(string memory name)
public
external
view
soulNameAlreadySet
returns (bool available)
Expand Down
2 changes: 1 addition & 1 deletion contracts/tokens/MasaSBTSelfSovereign.sol
Expand Up @@ -113,7 +113,7 @@ abstract contract MasaSBTSelfSovereign is PaymentGateway, MasaSBT, EIP712 {
/// @param paymentMethod Address of token that user want to pay
/// @return Current price for minting in the given payment method
function getMintingPrice(address paymentMethod)
public
external
view
returns (uint256)
{
Expand Down

0 comments on commit c475044

Please sign in to comment.