const data = erc725.encodeData([
// the permission of the beneficiary address
{
keyName: 'AddressPermissions:Permissions:<address>',
dynamicKeyParts: beneficiaryAddress,
value: beneficiaryPermissions,
},
// the new list controllers addresses (= addresses with permissions set on the UP)
// + the incremented `AddressPermissions[]` array length
{
keyName: 'AddressPermissions[]',
value: [...controllers, beneficiaryAddress],
},
]);
Yet we're passing arrays of keys and values to setData.
Link to doc page: https://docs.lukso.tech/learn/expert-guides/key-manager/grant-permissions#step-1---initialize-erc725js
Below code is an array of keys and values:
Yet we're passing arrays of keys and values to setData.
setData needs to be changed to setDataBatch. Also, at the end of the page it's called "data", but before it's called "permissionData".