-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build!: re-open LSP16 PR to move it again as its own package (#877)
* build!: move LSP17ContractExtension in its own package (#858) * ci: create deployment script to deploy + verify base contracts on mainnet (#849) * refactor: convert verify balance script into Hardhat task * ci: add script to deploy and verify base contracts on mainnet * ci: create bash file + setup mainnet deployer * ci: refactor workflow to deploy and verify contracts using Hardhat task * build!: move LSP17ContractExtension in its own package * docs: add latest LSP7 + LSP8 Tokens audit report (#861) * wip --------- Co-authored-by: Jean Cvllr <[email protected]> Co-authored-by: CJ42 <[email protected]> * build!: move lsp16 to its own package * build: update package-lock.json * docs: update docs * test: remove test command of lsp16 * ci: update ci reference for lsp16 * test: add mock contracts --------- Co-authored-by: Skima Harvey <[email protected]> Co-authored-by: YamenMerhi <[email protected]>
- Loading branch information
1 parent
a0b18f0
commit a568c28
Showing
27 changed files
with
1,683 additions
and
642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,7 +85,6 @@ jobs: | |
"lsp20", | ||
"lsp20init", | ||
"lsp23", | ||
"universalfactory", | ||
"reentrancy", | ||
"reentrancyinit", | ||
"mocks", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
435 changes: 0 additions & 435 deletions
435
docs/contracts/LSP16UniversalFactory/LSP16UniversalFactory.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['custom'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"avoid-sha3": "error", | ||
"avoid-suicide": "error", | ||
"avoid-throw": "error", | ||
"avoid-tx-origin": "error", | ||
"check-send-result": "error", | ||
"compiler-version": ["error", "^0.8.0"], | ||
"func-visibility": ["error", { "ignoreConstructors": true }], | ||
"not-rely-on-block-hash": "error", | ||
"not-rely-on-time": "error", | ||
"reentrancy": "error", | ||
"constructor-syntax": "error", | ||
"private-vars-leading-underscore": ["error", { "strict": false }], | ||
"imports-on-top": "error", | ||
"visibility-modifier-order": "error", | ||
"no-unused-import": "error", | ||
"no-global-import": "error", | ||
"reason-string": ["warn", { "maxLength": 120 }], | ||
"avoid-low-level-calls": "off", | ||
"no-empty-blocks": ["error", { "ignoreConstructors": true }], | ||
"custom-errors": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# LSP16 Universal Factory | ||
|
||
Package for the [LSP16-UniversalFactory](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-16-UniversalFactory.md) standard, contains a contract that allows deploying contracts on multiple chains with the same address. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.13; | ||
|
||
import {ERC725} from "@erc725/smart-contracts/contracts/ERC725.sol"; | ||
|
||
contract Account is ERC725 { | ||
// solhint-disable-next-line no-empty-blocks | ||
constructor(address contractOwner) ERC725(contractOwner) {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/LSP16UniversalFactory/contracts/Mock/AccountInit.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.13; | ||
|
||
import { | ||
ERC725InitAbstract | ||
} from "@erc725/smart-contracts/contracts/ERC725InitAbstract.sol"; | ||
|
||
// solhint-disable-next-line no-empty-blocks | ||
contract AccountInit is ERC725InitAbstract { | ||
function initialize(address newOwner) public virtual initializer { | ||
ERC725InitAbstract._initialize(newOwner); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/LSP16UniversalFactory/contracts/Mock/ContractNoConstructor.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.4; | ||
|
||
contract ContractNoConstructor { | ||
uint256 private _number = 5; | ||
|
||
function getNumber() public view returns (uint256) { | ||
return _number; | ||
} | ||
|
||
function setNumber(uint256 newNumber) public { | ||
_number = newNumber; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/LSP16UniversalFactory/contracts/Mock/FallbackInitializer.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.4; | ||
|
||
/** | ||
* @dev sample contract used for testing | ||
*/ | ||
contract FallbackInitializer { | ||
address public caller; | ||
|
||
receive() external payable { | ||
_initialize(); | ||
} | ||
|
||
fallback() external payable { | ||
_initialize(); | ||
} | ||
|
||
function _initialize() internal { | ||
caller = msg.sender; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/LSP16UniversalFactory/contracts/Mock/ImplementationTester.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.4; | ||
|
||
import { | ||
Initializable | ||
} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | ||
|
||
contract ImplementationTester is Initializable { | ||
address private _owner; | ||
|
||
function initialize(address newOwner) public virtual initializer { | ||
_owner = newOwner; | ||
} | ||
|
||
function owner() public view virtual returns (address) { | ||
return _owner; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/LSP16UniversalFactory/contracts/Mock/NonPayableContract.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.13; | ||
|
||
contract NonPayableContract { | ||
address private _owner; | ||
|
||
constructor(address newOwner) { | ||
_owner = newOwner; | ||
} | ||
|
||
function getOwner() public view returns (address) { | ||
return _owner; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/LSP16UniversalFactory/contracts/Mock/NonPayableFallback.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.0; | ||
|
||
contract NonPayableFallback { | ||
// solhint-disable-next-line payable-fallback | ||
fallback() external {} | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/LSP16UniversalFactory/contracts/Mock/PayableContract.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.4; | ||
|
||
/** | ||
* @dev sample contract used for testing | ||
*/ | ||
contract PayableContract { | ||
// solhint-disable no-empty-blocks | ||
constructor() payable {} | ||
|
||
// solhint-disable no-empty-blocks | ||
function payableTrue() public payable {} | ||
|
||
// solhint-disable no-empty-blocks | ||
function payableFalse() public {} | ||
} |
File renamed without changes.
Oops, something went wrong.