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

Feature/refactor_access_lists #879

Merged
merged 9 commits into from
Sep 3, 2024
Merged

Conversation

alexcos20
Copy link
Member

@alexcos20 alexcos20 commented Sep 3, 2024

Changes proposed in this PR:

  • refactor AccessLists from simple contract to Factory + template deployment
  • add transferable option to AccessList on creation (soul bound or not)
  • Template4 always checks if AccessList is deployed by AccessListFactory and it's soul bound

contracts/accesslists/AccessList.sol Dismissed Show dismissed Hide dismissed
contracts/accesslists/AccessList.sol Dismissed Show dismissed Hide dismissed
*/

function initialize(
address owner_,

Check notice

Code scanning / Slither

Missing zero address validation Low

string calldata symbol_,
bool transferable_,
address[] memory user,
string[] memory _tokenURI

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

Comment on lines +51 to +62
function _isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.

uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly {
size := extcodesize(account)
}
return size > 0;
}

Check warning

Code scanning / Slither

Assembly usage Warning

string calldata name,
string calldata symbol,
bool transferable,
address owner,

Check notice

Code scanning / Slither

Local variable shadowing Low

bool transferable,
address owner,
address[] memory user,
string[] memory _tokenURI

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

*/

// function to activate a disabled token.
function changeTemplateAddress(address _newTemplateAddress) external onlyOwner {

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

Comment on lines +143 to +146
function isSoulBound(address contractAddress) external view returns (bool){
require(isDeployed(contractAddress)==true,"Not deployed by factory");
return(!(IAccessList(contractAddress).transferable()));
}

Check warning

Code scanning / Slither

Boolean equality Warning

contracts/templates/ERC20Template4.sol Fixed Show fixed Hide fixed
Copy link

openzeppelin-code bot commented Sep 3, 2024

Feature/refactor_access_lists

Generated at commit: da662a10d26f2f881332f2b9dc2600b9185c3797

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
1
0
10
39
52
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@alexcos20 alexcos20 marked this pull request as ready for review September 3, 2024 10:41
@alexcos20 alexcos20 self-assigned this Sep 3, 2024
@alexcos20 alexcos20 merged commit cbe3a1e into main Sep 3, 2024
17 checks passed
@alexcos20 alexcos20 deleted the feature/refactor_access_lists branch September 3, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant