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

SOV-4106 Feat: Fee sharing collector with direct transfer #548

Open
wants to merge 15 commits into
base: bobDevelopment
Choose a base branch
from
Prev Previous commit
Next Next commit
add check in unit test
cwsnt committed Jun 6, 2024
commit cd3cfe721d63faeb06c079218e51e5e926659262
6 changes: 5 additions & 1 deletion tests/FeeSharingCollectorTest.js
Original file line number Diff line number Diff line change
@@ -502,8 +502,12 @@ contract("FeeSharingCollector:", (accounts) => {
});

it("setSovrynDexAddress should only be called once", async () => {
expect(await feeSharingCollector.sovrynDexAddress()).to.equal(sovrynDex.address);
const newSovrynDexAddress = (await MockSovrynDex.new()).address;
await expectRevert(feeSharingCollector.setSovrynDexAddress(newSovrynDexAddress), "FeeSharingCollector: function can only be called once");
await expectRevert(
feeSharingCollector.setSovrynDexAddress(newSovrynDexAddress),
"FeeSharingCollector: function can only be called once"
);
});
});


Unchanged files with check annotations Beta

* Licensed under the Apache License, Version 2.0.
*/
pragma solidity 0.5.17;

Check warning on line 6 in contracts/connectors/loantoken/AdvancedToken.sol

GitHub Actions / build (18.x)

Compiler version 0.5.17 does not satisfy the ^0.8.0 semver requirement
import "./AdvancedTokenStorage.sol";

Check warning on line 8 in contracts/connectors/loantoken/AdvancedToken.sol

GitHub Actions / build (18.x)

global import of path ./AdvancedTokenStorage.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
/**
* @title Advanced Token contract.
uint256 _assetAmount,
uint256 _price
) internal returns (uint256) {
require(_to != address(0), "15");

Check warning on line 63 in contracts/connectors/loantoken/AdvancedToken.sol

GitHub Actions / build (18.x)

Use Custom Errors instead of require statements
uint256 _balance = balances[_to].add(_tokenAmount);
balances[_to] = _balance;
* Licensed under the Apache License, Version 2.0.
*/
pragma solidity 0.5.17;

Check warning on line 6 in contracts/connectors/loantoken/AdvancedTokenStorage.sol

GitHub Actions / build (18.x)

Compiler version 0.5.17 does not satisfy the ^0.8.0 semver requirement
import "./LoanTokenBase.sol";

Check warning on line 8 in contracts/connectors/loantoken/AdvancedTokenStorage.sol

GitHub Actions / build (18.x)

global import of path ./LoanTokenBase.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
/**
* @title Advanced Token Storage contract.
/* Storage */
mapping(address => uint256) internal balances;

Check warning on line 50 in contracts/connectors/loantoken/AdvancedTokenStorage.sol

GitHub Actions / build (18.x)

'balances' should start with _
mapping(address => mapping(address => uint256)) internal allowed;

Check warning on line 51 in contracts/connectors/loantoken/AdvancedTokenStorage.sol

GitHub Actions / build (18.x)

'allowed' should start with _
uint256 internal totalSupply_;

Check warning on line 52 in contracts/connectors/loantoken/AdvancedTokenStorage.sol

GitHub Actions / build (18.x)

'totalSupply_' should start with _
/* Functions */
* Licensed under the Apache License, Version 2.0.
*/
pragma solidity 0.5.17;

Check warning on line 6 in contracts/connectors/loantoken/interfaces/FeedsLike.sol

GitHub Actions / build (18.x)

Compiler version 0.5.17 does not satisfy the ^0.8.0 semver requirement
interface FeedsLike {
function queryRate(
* Licensed under the Apache License, Version 2.0.
*/
pragma solidity 0.5.17;

Check warning on line 6 in contracts/connectors/loantoken/interfaces/ProtocolLike.sol

GitHub Actions / build (18.x)

Compiler version 0.5.17 does not satisfy the ^0.8.0 semver requirement
pragma experimental ABIEncoderV2;
import "../lib/MarginTradeStructHelpers.sol";