Skip to content

Commit

Permalink
add data
Browse files Browse the repository at this point in the history
  • Loading branch information
dovgopoly committed Feb 26, 2024
1 parent 2d9428a commit e7b37de
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 19 deletions.
9 changes: 6 additions & 3 deletions contracts/TokenF.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ abstract contract TokenF is Diamond, DiamondERC20, AgentAccessControl {
from_,
to_,
amount_,
operator_
operator_,
""
)
{} catch {
revert("TokenF: transferred reverted");
Expand All @@ -123,7 +124,8 @@ abstract contract TokenF is Diamond, DiamondERC20, AgentAccessControl {
from_,
to_,
amount_,
operator_
operator_,
""
)
returns (bool canTransfer_) {
require(canTransfer_, "TokenF: cannot transfer");
Expand All @@ -144,7 +146,8 @@ abstract contract TokenF is Diamond, DiamondERC20, AgentAccessControl {
from_,
to_,
amount_,
operator_
operator_,
""
)
returns (bool isKYCed_) {
require(isKYCed_, "TokenF: not KYCed");
Expand Down
3 changes: 2 additions & 1 deletion contracts/interfaces/IKYCModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ interface IKYCModule {
address from_,
address to_,
uint256 amount_,
address operator_
address operator_,
bytes memory data_
) external view returns (bool);

function getTokenF() external view returns (address);
Expand Down
6 changes: 4 additions & 2 deletions contracts/interfaces/IRegulatoryModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ interface IRegulatoryModule {
address from_,
address to_,
uint256 amount_,
address operator_
address operator_,
bytes memory data_
) external;

function canTransfer(
bytes4 selector_,
address from_,
address to_,
uint256 amount_,
address operator_
address operator_,
bytes memory data_
) external view returns (bool);

function getTokenF() external view returns (address);
Expand Down
6 changes: 4 additions & 2 deletions contracts/kyc/KYCCompliance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ abstract contract KYCCompliance is KYCComplianceStorage, AgentAccessControl {
address from_,
address to_,
uint256 amount_,
address operator_
address operator_,
bytes memory data_
) public view virtual returns (bool) {
address[] memory regulatoryModules_ = getKYCModules();

Expand All @@ -46,7 +47,8 @@ abstract contract KYCCompliance is KYCComplianceStorage, AgentAccessControl {
from_,
to_,
amount_,
operator_
operator_,
data_
)
) {
return false;
Expand Down
3 changes: 2 additions & 1 deletion contracts/kyc/modules/RarimoModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ abstract contract RarimoModule is AbstractKYCModule {
address,
address to_,
uint256,
address
address,
bytes memory
) public view virtual override returns (bool) {
if (selector_ == TokenF.forcedTransfer.selector || selector_ == TokenF.burn.selector) {
return true;
Expand Down
12 changes: 8 additions & 4 deletions contracts/regulatory/RegulatoryCompliance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ abstract contract RegulatoryCompliance is RegulatoryComplianceStorage, AgentAcce
address from_,
address to_,
uint256 amount_,
address operator_
address operator_,
bytes memory data_
) public virtual onlyThis {
address[] memory regulatoryModules_ = getRegulatoryModules();

Expand All @@ -52,7 +53,8 @@ abstract contract RegulatoryCompliance is RegulatoryComplianceStorage, AgentAcce
from_,
to_,
amount_,
operator_
operator_,
data_
);
}
}
Expand All @@ -62,7 +64,8 @@ abstract contract RegulatoryCompliance is RegulatoryComplianceStorage, AgentAcce
address from_,
address to_,
uint256 amount_,
address operator_
address operator_,
bytes memory data_
) public view virtual returns (bool) {
address[] memory regulatoryModules_ = getRegulatoryModules();

Expand All @@ -73,7 +76,8 @@ abstract contract RegulatoryCompliance is RegulatoryComplianceStorage, AgentAcce
from_,
to_,
amount_,
operator_
operator_,
data_
)
) {
return false;
Expand Down
14 changes: 8 additions & 6 deletions contracts/regulatory/modules/TransferLimitsModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,21 @@ abstract contract TransferLimitsModule is AbstractRegulatoryModule {
}

function transferred(
bytes4 selector_,
address from_,
address to_,
uint256 amount_,
address operator_
bytes4,
address,
address,
uint256,
address,
bytes memory
) public virtual override {}

function canTransfer(
bytes4 selector_,
address,
address,
uint256 amount_,
address
address,
bytes memory
) public view virtual override returns (bool) {
if (
selector_ == TokenF.burn.selector ||
Expand Down

0 comments on commit e7b37de

Please sign in to comment.