-
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!: move lsp16 to its own package
- Loading branch information
1 parent
c6f4f99
commit 69ec255
Showing
22 changed files
with
1,440 additions
and
30 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
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
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; | ||
} | ||
} |
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.
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
Oops, something went wrong.