Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions solidity/src/authorization/Authorization.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract Authorization is Ownable, ICallback, ReentrancyGuard {
* @notice Boolean indicating whether to store callbacks or just emit events for them
* @dev If true, the contract will store callback data in the contract's state
*/
bool public storeCallbacks;
bool public immutable storeCallbacks;

/**
* @notice Event emitted when a callback is received from the processor
Expand Down Expand Up @@ -333,11 +333,11 @@ contract Authorization is Ownable, ICallback, ReentrancyGuard {
_requireAdminAccess();
}

// Forward the validated and modified message to the processor
processor.execute(message);

// Increment the execution ID for the next message
executionId++;

// Forward the validated and modified message to the processor
processor.execute(message);
}
Comment thread
bekauz marked this conversation as resolved.

/**
Expand Down
4 changes: 2 additions & 2 deletions solidity/src/processor/ProcessorBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ abstract contract ProcessorBase is Ownable {
* @dev Only callable by the contract owner
* @param _address The address to be authorized
*/
function addAuthorizedAddress(address _address) public onlyOwner {
function addAuthorizedAddress(address _address) external onlyOwner {
// Check that address is not the zero address
if (_address == address(0)) {
revert ProcessorErrors.InvalidAddress();
Expand All @@ -335,7 +335,7 @@ abstract contract ProcessorBase is Ownable {
* @dev Only callable by the contract owner
* @param _address The address to be removed from the authorized list
*/
function removeAuthorizedAddress(address _address) public onlyOwner {
function removeAuthorizedAddress(address _address) external onlyOwner {
// Check that address is currently authorized
if (!authorizedAddresses[_address]) {
revert ProcessorErrors.AddressNotAuthorized();
Expand Down
19 changes: 9 additions & 10 deletions solidity/src/vaults/OneWayVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,12 @@ contract OneWayVault is
string memory vaultTokenName,
string memory vaultTokenSymbol,
uint256 startingRate
) public initializer {
) external initializer {
__ERC20_init(vaultTokenName, vaultTokenSymbol);
__ERC4626_init(IERC20(underlying));
__Ownable_init(_owner);
__ReentrancyGuard_init();
__UUPSUpgradeable_init();

config = abi.decode(_config, (OneWayVaultConfig));
_validateConfig(config);
Expand All @@ -278,7 +279,7 @@ contract OneWayVault is
* @dev Validates all configuration parameters before updating
* @param _config Encoded OneWayVaultConfig struct
*/
function updateConfig(bytes memory _config) public onlyOwner {
function updateConfig(bytes memory _config) external onlyOwner {
OneWayVaultConfig memory decodedConfig = abi.decode(_config, (OneWayVaultConfig));

_validateConfig(decodedConfig);
Expand Down Expand Up @@ -400,15 +401,14 @@ contract OneWayVault is
}

uint256 depositFee = calculateDepositFee(assets);
uint256 assetsAfterFee;
assetsAfterFee = assets - depositFee;
uint256 assetsAfterFee = assets - depositFee;

if (depositFee > 0) {
feesAccruedInAsset += depositFee;
}

uint256 shares = previewDeposit(assetsAfterFee);
_deposit(_msgSender(), receiver, assets, shares);
_deposit(msg.sender, receiver, assets, shares);
Comment thread
keyleu marked this conversation as resolved.

return shares;
}
Expand All @@ -435,7 +435,7 @@ contract OneWayVault is
feesAccruedInAsset += fee;
}

_deposit(_msgSender(), receiver, grossAssets, shares);
_deposit(msg.sender, receiver, grossAssets, shares);
Comment thread
keyleu marked this conversation as resolved.

return grossAssets;
}
Expand Down Expand Up @@ -547,8 +547,7 @@ contract OneWayVault is
// This formula ensures that after the fee is deducted, exactly baseAssets remain
uint256 grossAssets = baseAssets.mulDiv(BASIS_POINTS, BASIS_POINTS - feeBps, Math.Rounding.Ceil);

uint256 fee;
fee = grossAssets - baseAssets;
uint256 fee = grossAssets - baseAssets;

return (grossAssets, fee);
}
Expand Down Expand Up @@ -594,7 +593,7 @@ contract OneWayVault is
* @param receiver Address to receive the withdrawn assets on the destination domain (as string)
* @param owner Address that owns the shares
*/
function withdraw(uint256 assets, string calldata receiver, address owner) public nonReentrant whenNotPaused {
function withdraw(uint256 assets, string calldata receiver, address owner) external nonReentrant whenNotPaused {
if (_checkAndHandleStaleRate()) {
return; // Exit early if vault was just paused
}
Expand Down Expand Up @@ -632,7 +631,7 @@ contract OneWayVault is
* @param receiver Address to receive the redeemed assets on destination domain (as string)
* @param owner Address that owns the shares
*/
function redeem(uint256 shares, string calldata receiver, address owner) public nonReentrant whenNotPaused {
function redeem(uint256 shares, string calldata receiver, address owner) external nonReentrant whenNotPaused {
if (_checkAndHandleStaleRate()) {
return; // Exit early if vault was just paused
}
Expand Down
1 change: 1 addition & 0 deletions solidity/src/vaults/ValenceVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ contract ValenceVault is
__ERC4626_init(IERC20(underlying));
__Ownable_init(_owner);
__ReentrancyGuard_init();
__UUPSUpgradeable_init();

config = abi.decode(_config, (VaultConfig));
_validateConfig(config);
Expand Down
Loading