Skip to content

Commit

Permalink
Add playground snippet to add controller permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
lykhonis committed Nov 10, 2023
1 parent a2b284b commit 0080510
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .env.testnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OWNER_LEDGER_DERIVATION_PATH="m/44'/60'/4'/0/0"

TREASURY_ADDRESS=0x41482D3Fd98277cf576485a278638B02253417cf

PROFILE_ADDRESS=0x07f15ab9f47a004a21552e6b8c81ad2b37ff52d5
PROFILE_ADDRESS=0x7B22cB08553d7ec00943403cC6b17ec26b517dC0
PROFILE_CONTROLLER_ADDRESS=0x3f329ebe23a6443bebaf05c092c152a7754f5d32
PROFILE_CONTROLLER_LEDGER_DERIVATION_PATH="m/44'/60'/1'/0/0"

Expand All @@ -37,7 +37,7 @@ CONTRACT_LSP8_MARKETPLACE_ADDRESS=0xe9f0feab3d50ccbe40d99f669fe1e89172908cdf

CONTRACT_GENESIS_DIGITAL_ASSET_ADDRESS=0x86488e1c57115f6a7cad26a4f83367cb1e117911

CONTRACT_PAGE_NAME_ADDRESS=0x48e37a167a3ee426389dc6e1dc2d440e86c3737f
CONTRACT_PAGE_NAME_ADDRESS=0x8b08eeb9183081de7e2d4ae49fad4afb56e31ab4

CONTRACT_COLLECTOR_DIGITAL_ASSET_ADDRESS=0x9eb7a7666fc33e7a68a061ac6de2e239f865658b

Expand Down
8 changes: 8 additions & 0 deletions scripts/Playground.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {LSP0ERC725AccountCore} from "@lukso/lsp-smart-contracts/contracts/LSP0ER
import {OPERATION_0_CALL} from "@erc725/smart-contracts/contracts/constants.sol";
import {LSP6KeyManager} from "@lukso/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol";
import {LSP6Utils} from "@lukso/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Utils.sol";
// import {ALL_REGULAR_PERMISSIONS} from "@lukso/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Constants.sol";
// import {ERC725} from "@erc725/smart-contracts/contracts/ERC725.sol";
import {LSP7DigitalAsset} from "@lukso/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol";
import {LSP8IdentifiableDigitalAsset} from
"@lukso/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol";
Expand Down Expand Up @@ -45,6 +47,12 @@ contract Playground is Script {

// address oldProfile = 0xd78A3A4A4cd3E01Cc6Af8f5Eb4acBc1049Fe315e;

// (bytes32[] memory keys, bytes[] memory values) = LSP6Utils.generateNewPermissionsKeys(
// ERC725(address(profile)), 0x215331b6bbEb33a9C59c9Cfd0B49808516B2FecC, ALL_REGULAR_PERMISSIONS
// );
// vm.broadcast(controller);
// LSP6Utils.setDataViaKeyManager(address(keyManager), keys, values);

uint256 ownerKey = 0xc0a4cb4f7926b36535ffa6aedc89414216ba5fb84f6c652ad9b6dc6c201924be;
address owner = vm.addr(ownerKey);
console.log("Owner: %s", Strings.toHexString(uint160(owner), 20));
Expand Down

0 comments on commit 0080510

Please sign in to comment.