File tree Expand file tree Collapse file tree 2 files changed +38
-5
lines changed
Expand file tree Collapse file tree 2 files changed +38
-5
lines changed Original file line number Diff line number Diff line change 22pragma solidity ^ 0.8.4 ;
33
44import "@lukso/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol " ;
5+ import "@lukso/LSP6KeyManager/LSP6KeyManager.sol " ;
6+
57
68
79contract SecureAssetLocker is LSP4DigitalAssetMetadata {
810
11+ address public universalProfile;
12+ LSP6KeyManager keyManager;
13+
14+ constructor (
15+ address _universalProfile ,
16+ address _keyManager ,
17+ string memory _tokenName ,
18+ string memory _tokenSymbol ,
19+ address _newOwner
20+ )
21+ LSP4DigitalAssetMetadata (_tokenName, _tokenSymbol, _newOwner)
22+ {
23+ universalProfile = _universalProfile;
24+ keyManager = LSP6KeyManager (_keyManager);
25+ }
26+
27+
928}
Original file line number Diff line number Diff line change @@ -8,18 +8,32 @@ import "../contracts/mocks/MockLSP7.sol";
88contract SecureAssetLockerTest is Test {
99 SecureAssetLocker locker;
1010 MockLSP7 token;
11-
12- function setUp () public {
11+ address owner = address (0xABCD );
12+ address otherUser = address (0xBEEF );
13+
14+ bytes32 LOCK_ASSET_PERMISSION = keccak256 ("LOCK_ASSET " );
15+ bytes32 UNLOCK_ASSET_PERMISSION = keccak256 ("UNLOCK_ASSET " );
16+
17+ bytes32 assetId = keccak256 ("asset-1 " );
18+
19+
20+ function setUp () public {
1321 // Deploy a mock LSP7 token
1422 token = new MockLSP7 ();
1523
1624 // Mint tokens to owner
1725 token.mint (owner, 1000 ether);
1826
19- // Deploy the SecureAssetLocker (with mock UP and KeyManager addresses)
20- locker = new SecureAssetLocker (address (1 ), address (2 ));
27+ // Deploy the SecureAssetLocker with correct parameters
28+ locker = new SecureAssetLocker (
29+ address (1 ), // universalProfile (mocked)
30+ address (2 ), // keyManager (mocked)
31+ "Secure Asset Locker " , // tokenName
32+ "SAL " , // tokenSymbol
33+ owner // newOwner (Universal Profile owner address)
34+ );
35+
2136
22-
2337 }
2438
2539 function testLockAssetSuccess () public {
You can’t perform that action at this time.
0 commit comments