Skip to content

Commit

Permalink
Merge pull request #226 from ERC725Alliance/develop
Browse files Browse the repository at this point in the history
chore: release v0.15.0
  • Loading branch information
CallumGrindle authored Sep 14, 2022
2 parents 0d0064d + 6551997 commit 6ef86bc
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 29 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [0.15.0](https://github.com/ERC725Alliance/erc725.js/compare/v0.14.4...v0.15.0) (2022-09-14)


### ⚠ BREAKING CHANGES

* add LSP6 `ENCRYPT` permission in for encrypt/decrypt permissions methods. (#223)

### [0.14.4](https://github.com/ERC725Alliance/erc725.js/compare/v0.14.3...v0.14.4) (2022-07-25)

### Features
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import { ERC725 } from '@erc725/erc725.js';
import ERC725 from '@erc725/erc725.js';
```

If you install it on the backend side, you may need to also install [`isomorphic-fetch`](https://www.npmjs.com/package/isomorphic-fetch).

## Example Instantiation

```js
Expand Down
10 changes: 8 additions & 2 deletions docs/classes/ERC725.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,12 @@ ERC725.encodePermissions({
DEPLOY: false,
TRANSFERVALUE: true,
SIGN: false,
ENCRYPT: false,
SUPER_SETDATA: false,
SUPER_TRANSFERVALUE: false,
SUPER_CALL: false,
SUPER_STATICCALL: false,
SUPER_DELEGATECALL: false
}),
// '0x0000000000000000000000000000000000000000000000000000000000000110'

Expand Down Expand Up @@ -1122,11 +1128,11 @@ Checks if a signature was signed by the `owner` of the ERC725 Account contract,

#### Parameters

##### 1. `messageOrHash` - String
##### 1. `messageOrHash` - String

Value of a message or hash that needs to be verified.

##### 2. `signature` - String
##### 2. `signature` - String

The raw RLP encoded signature.

Expand Down
12 changes: 9 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ The `@erc725/erc725.js` package allows you to interact with the ERC-725 schemas
npm install @erc725/erc725.js
```

:::info

If you install it on the backend side, you may need to also install [`isomorphic-fetch`](https://www.npmjs.com/package/isomorphic-fetch).

:::

## Instantiation

```js
Expand All @@ -32,22 +38,22 @@ const schemas = [
name: 'SupportedStandards:LSP3UniversalProfile',
key: '0xeafec4d89fa9619884b60000abe425d64acd861a49b8ddf5c0b6962110481f38',
keyType: 'Mapping',
valueContent: '0xabe425d6',
valueType: 'bytes',
valueContent: '0xabe425d6',
},
{
name: 'LSP3Profile',
key: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
keyType: 'Singleton',
valueContent: 'JSONURL',
valueType: 'bytes',
valueContent: 'JSONURL',
},
{
name: 'LSP1UniversalReceiverDelegate',
key: '0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47',
keyType: 'Singleton',
valueContent: 'Address',
valueType: 'address',
valueContent: 'Address',
},
];

Expand Down
2 changes: 1 addition & 1 deletion docs/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ _A quick reference for keys used in schema definitions can be seen below_
- `name`: An arbitrary name
- `key`: The sha3 hash of the name
- `keyType`: One of the supported erc725 keyTypes
- `valueContent`: The described content type for parsing
- `valueType`: The type of the content data in store for decoding
- `valueContent`: The described content type for parsing

## Standard LSP Schemas

Expand Down
12 changes: 0 additions & 12 deletions docs/writing-data.md

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@erc725/erc725.js",
"version": "0.14.4",
"version": "0.15.0",
"description": "Library to interact with ERC725 smart contracts",
"main": "build/main/src/index.js",
"typings": "build/main/src/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions schemas/LSP6KeyManager.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"name": "AddressPermissions:AllowedERC725YKeys:<address>",
"key": "0x4b80742de2bf90b8b4850000<address>",
"keyType": "MappingWithGrouping",
"valueType": "bytes4[]",
"valueContent": "Bytes4"
"valueType": "bytes32[]",
"valueContent": "Bytes32"
}
]
10 changes: 9 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -917,13 +917,14 @@ describe('Running @erc725/erc725.js tests...', () => {
DEPLOY: true,
TRANSFERVALUE: true,
SIGN: true,
ENCRYPT: true,
SUPER_SETDATA: false,
SUPER_TRANSFERVALUE: false,
SUPER_CALL: false,
SUPER_STATICCALL: false,
SUPER_DELEGATECALL: false,
},
hex: '0x00000000000000000000000000000000000000000000000000000000000003ff',
hex: '0x00000000000000000000000000000000000000000000000000000000000007ff',
},
{
permissions: {
Expand All @@ -937,6 +938,7 @@ describe('Running @erc725/erc725.js tests...', () => {
DEPLOY: false,
TRANSFERVALUE: false,
SIGN: false,
ENCRYPT: false,
SUPER_SETDATA: false,
SUPER_TRANSFERVALUE: false,
SUPER_CALL: false,
Expand All @@ -957,6 +959,7 @@ describe('Running @erc725/erc725.js tests...', () => {
DEPLOY: false,
TRANSFERVALUE: true,
SIGN: true,
ENCRYPT: false,
SUPER_SETDATA: false,
SUPER_TRANSFERVALUE: false,
SUPER_CALL: false,
Expand All @@ -977,6 +980,7 @@ describe('Running @erc725/erc725.js tests...', () => {
DEPLOY: false,
TRANSFERVALUE: false,
SIGN: false,
ENCRYPT: false,
SUPER_SETDATA: false,
SUPER_TRANSFERVALUE: false,
SUPER_CALL: false,
Expand All @@ -997,6 +1001,7 @@ describe('Running @erc725/erc725.js tests...', () => {
DEPLOY: false,
TRANSFERVALUE: false,
SIGN: false,
ENCRYPT: false,
SUPER_SETDATA: false,
SUPER_TRANSFERVALUE: false,
SUPER_CALL: false,
Expand All @@ -1017,6 +1022,7 @@ describe('Running @erc725/erc725.js tests...', () => {
DEPLOY: false,
TRANSFERVALUE: true,
SIGN: false,
ENCRYPT: false,
SUPER_SETDATA: false,
SUPER_TRANSFERVALUE: false,
SUPER_CALL: false,
Expand Down Expand Up @@ -1090,6 +1096,7 @@ describe('Running @erc725/erc725.js tests...', () => {
DEPLOY: true,
TRANSFERVALUE: true,
SIGN: true,
ENCRYPT: true,
SUPER_SETDATA: true,
SUPER_TRANSFERVALUE: true,
SUPER_CALL: true,
Expand All @@ -1112,6 +1119,7 @@ describe('Running @erc725/erc725.js tests...', () => {
DEPLOY: true,
TRANSFERVALUE: true,
SIGN: true,
ENCRYPT: true,
SUPER_SETDATA: true,
SUPER_TRANSFERVALUE: true,
SUPER_CALL: true,
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ export class ERC725 {
DEPLOY: false,
TRANSFERVALUE: false,
SIGN: false,
ENCRYPT: false,
SUPER_SETDATA: false,
SUPER_TRANSFERVALUE: false,
SUPER_CALL: false,
Expand Down
11 changes: 6 additions & 5 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,17 @@ export const LSP6_DEFAULT_PERMISSIONS = {
TRANSFERVALUE:
'0x0000000000000000000000000000000000000000000000000000000000000100',
SIGN: '0x0000000000000000000000000000000000000000000000000000000000000200',
ENCRYPT: '0x0000000000000000000000000000000000000000000000000000000000000400',
SUPER_SETDATA:
'0x0000000000000000000000000000000000000000000000000000000000000400',
SUPER_TRANSFERVALUE:
'0x0000000000000000000000000000000000000000000000000000000000000800',
SUPER_CALL:
SUPER_TRANSFERVALUE:
'0x0000000000000000000000000000000000000000000000000000000000001000',
SUPER_STATICCALL:
SUPER_CALL:
'0x0000000000000000000000000000000000000000000000000000000000002000',
SUPER_DELEGATECALL:
SUPER_STATICCALL:
'0x0000000000000000000000000000000000000000000000000000000000004000',
SUPER_DELEGATECALL:
'0x0000000000000000000000000000000000000000000000000000000000008000',
};

export const LSP6_ALL_PERMISSIONS =
Expand Down
1 change: 1 addition & 0 deletions src/types/Method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface Permissions {
DEPLOY?: boolean;
TRANSFERVALUE?: boolean;
SIGN?: boolean;
ENCRYPT?: boolean;
SUPER_SETDATA?: boolean;
SUPER_TRANSFERVALUE?: boolean;
SUPER_CALL?: boolean;
Expand Down

0 comments on commit 6ef86bc

Please sign in to comment.