Skip to content

Commit

Permalink
test: update tokens deployments on foundry tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Nov 24, 2023
1 parent fc580a3 commit 54a623c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const ERC725YDataKeys = {
// keccak256('LSP4TokenSymbol')
LSP4TokenSymbol: '0x2f0a68ab07768e01943a599e73362a0e17a63a72e94dd2e384d2c1d4db932756',

// kecca256('LSP4TokenType)
// keccak256('LSP4TokenType)
LSP4TokenType: '0xe0261fa95db2eb3b5439bd033cda66d56b96f92f243a8228fd87550ed7bdfdb3',

// keccak256('LSP4Metadata')
Expand Down
6 changes: 6 additions & 0 deletions contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.4;

// Token types

uint256 constant _LSP4_TOKEN_TYPE_TOKEN = 0;
uint256 constant _LSP4_TOKEN_TYPE_NFT = 1;
uint256 constant _LSP4_TOKEN_TYPE_COLLECTION = 2;

// --- ERC725Y entries

// bytes10(keccak256('SupportedStandards')) + bytes2(0) + bytes20(keccak256('LSP4DigitalAsset'))
Expand Down
10 changes: 8 additions & 2 deletions tests/foundry/GasTests/execute/RestrictedController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import "../../../../contracts/Mocks/Tokens/LSP8Tester.sol";
import {
_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY
} from "../../../../contracts/LSP1UniversalReceiver/LSP1Constants.sol";
import {
_LSP4_TOKEN_TYPE_TOKEN,
_LSP4_TOKEN_TYPE_NFT
} from "../../../../contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol";
import {
_LSP6KEY_ADDRESSPERMISSIONS_PERMISSIONS_PREFIX,
_PERMISSION_SUPER_SETDATA,
Expand Down Expand Up @@ -442,7 +446,8 @@ contract ExecuteRestrictedController is UniversalProfileTestsHelper {
"TestLSP8",
"TSTLSP8",
digitalAssetsOwner,
_LSP8_TOKENID_TYPE_NUMBER
_LSP8_TOKENID_TYPE_NUMBER,
_LSP4_TOKEN_TYPE_NFT
);

bytes32 tokenID = bytes32(uint256(1));
Expand All @@ -467,7 +472,8 @@ contract ExecuteRestrictedController is UniversalProfileTestsHelper {
digitalAsset = new LSP7Tester(
"TestLSP7",
"TSTLSP7",
digitalAssetsOwner
digitalAssetsOwner,
_LSP4_TOKEN_TYPE_TOKEN
);

// mint 100 tokens to UniversalProfile
Expand Down
10 changes: 8 additions & 2 deletions tests/foundry/GasTests/execute/UnrestrictedController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import "../../../../contracts/Mocks/Tokens/LSP8Tester.sol";
import {
_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY
} from "../../../../contracts/LSP1UniversalReceiver/LSP1Constants.sol";
import {
_LSP4_TOKEN_TYPE_TOKEN,
_LSP4_TOKEN_TYPE_NFT
} from "../../../../contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol";
import {
_LSP6KEY_ADDRESSPERMISSIONS_PERMISSIONS_PREFIX,
_PERMISSION_SUPER_SETDATA,
Expand Down Expand Up @@ -264,7 +268,8 @@ contract ExecuteUnrestrictedController is UniversalProfileTestsHelper {
"TestLSP8",
"TSTLSP8",
digitalAssetsOwner,
_LSP8_TOKENID_TYPE_NUMBER
_LSP8_TOKENID_TYPE_NUMBER,
_LSP4_TOKEN_TYPE_NFT
);

bytes32 tokenID = bytes32(uint256(1));
Expand All @@ -289,7 +294,8 @@ contract ExecuteUnrestrictedController is UniversalProfileTestsHelper {
digitalAsset = new LSP7Tester(
"TestLSP7",
"TSTLSP7",
digitalAssetsOwner
digitalAssetsOwner,
_LSP4_TOKEN_TYPE_TOKEN
);

// mint 100 tokens to UniversalProfile
Expand Down

0 comments on commit 54a623c

Please sign in to comment.