Skip to content

Commit fe67abf

Browse files
committed
initial file setup
2 parents 24a2e8c + ee3ee8d commit fe67abf

21 files changed

+2700
-889
lines changed

.prettierignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false
4+
}

LSPs/LSP-0-ERC725Account.md

Lines changed: 193 additions & 116 deletions
Large diffs are not rendered by default.

LSPs/LSP-1-UniversalReceiver.md

Lines changed: 100 additions & 54 deletions
Large diffs are not rendered by default.

LSPs/LSP-10-ReceivedVaults.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The following two data keys (including their ERC725Y JSON schema) are proposed t
2020
The data key `LSP10VaultsMap` also helps to prevent adding duplications to the array, when automatically added via smart contract (e.g. a [LSP1-UniversalReceiverDelegate](./LSP-1-UniversalReceiver.md)).
2121

2222
## Motivation
23-
To be able to display received vaults in a profile we need to keep track of all received vaults contract addresses. This is important for [LSP3 UniversalProfile](./LSP-3-UniversalProfile.md), but also Assets smart contracts via [LSP5-ReceivedAssets](./LSP-5-ReceivedAssets.md) Standard.
23+
To be able to display received vaults in a profile we need to keep track of all received vaults contract addresses. This is important for [LSP0-ERC725Account](./LSP-0-ERC725Account.md).
2424

2525
## Specification
2626

@@ -48,7 +48,7 @@ References issued smart contract vaults.
4848

4949
References owned [LSP9Vaults](./LSP-9-Vault.md). This data key exists so that smart contracts can detect whether the address of a vault is present in the `LSP10Vaults[]` array without looping all over it on-chain. Moreover, it helps to identify at which index in the `LSP10Vaults[]` the vault address is located for easy access and to change or remove this specific vault from the array. Finally, it also allows the detection of the interface supported by the vault.
5050

51-
The data value MUST be constructed as follows: `bytes4(standardInterfaceId) + bytes8(indexNumber)`. Where:
51+
The data value MUST be constructed as follows: `bytes4(standardInterfaceId) + uint128(indexNumber)`. Where:
5252
- `standardInterfaceId` = the [ERC165 interface ID](https://eips.ethereum.org/EIPS/eip-165) of a [LSP9Vaults](./LSP-9-Vault.md): `0xfd4d5c50`.
5353
- `indexNumber` = the index in the [`LSP10Vaults[]` Array](#lsp10vaults)
5454

LSPs/LSP-12-IssuedAssets.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For more info about how to access each index of the `LSP12IssuedAssets[]` array,
5959

6060
References issued smart contract assets, like tokens (_e.g.: [LSP7 Digital Assets](./LSP-7-DigitalAsset)_) and NFTs (_e.g.: [LSP8 Identifiable Digital Assets](./LSP-8-IdentifiableDigitalAsset)_). This data key exists so that smart contracts can detect whether the address of an asset is present in the `LSP12IssuedAssets[]` array without looping all over it on-chain. Moreover, it helps to identify at which index in the `LSP12IssuedAssets[]` the asset address is located for easy access and to change or remove this specific asset from the array. Finally, it also allows the detection of the interface supported by the asset.
6161

62-
The data value MUST be constructed as follows: `bytes4(standardInterfaceId) + bytes8(indexNumber)`. Where:
62+
The data value MUST be constructed as follows: `bytes4(standardInterfaceId) + uint128(indexNumber)`. Where:
6363
- `standardInterfaceId` = the [ERC165 interface ID](https://eips.ethereum.org/EIPS/eip-165) of the standard that the token or asset smart contract implements (if the ERC165 interface ID is unknown, `standardInterfaceId = 0xffffffff`).
6464
- `indexNumber` = the index in the [`LSP12IssuedAssets[]` Array](#LSP12Issuedassets)
6565

@@ -70,7 +70,7 @@ Value example: `0x5fcaac27000000000000000c` (interfaceId: `0x5fcaac27` for a [LS
7070
"name": "LSP12IssuedAssetsMap:<address>",
7171
"key": "0x74ac2555c10b9349e78f0000<address>",
7272
"keyType": "Mapping",
73-
"valueType": "(bytes4,bytes8)",
73+
"valueType": "(bytes4,uint128)",
7474
"valueContent": "(Bytes4,Number)"
7575
}
7676
```
@@ -93,7 +93,7 @@ ERC725Y JSON Schema `LSP12IssuedAssets`:
9393
"name": "LSP12IssuedAssetsMap:<address>",
9494
"key": "0x74ac2555c10b9349e78f0000<address>",
9595
"keyType": "Mapping",
96-
"valueType": "(bytes4,bytes8)",
96+
"valueType": "(bytes4,uint128)",
9797
"valueContent": "(Bytes4,Number)"
9898
}
9999
]

LSPs/LSP-15-TransactionRelayServiceAPI.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,28 @@ A Transaction Relay Service API for consistency across all Transaction Relay Ser
1414

1515
## Abstract
1616

17-
The [LSP-6-KeyManager](./LSP-6-KeyManager.md) proposes an [`executeRelayCall()`](./LSP-6-KeyManager.md#executerelaycall) function. It allows anybody to execute `_calldata` payload on a set ERC725 X or Y smart contract, given they have a signed message from a valid executor. This opens the way to Transaction Relay Services which send transactions on behalf of a user to cover their gas costs.
17+
The [LSP-6-KeyManager](./LSP-6-KeyManager.md) proposes an [`executeRelayCall()`](./LSP-6-KeyManager.md#executerelaycall) function. It allows anybody to execute `_calldata` payload on a set ERC725 X or Y smart contract, given they have a signed message from a valid executor. This opens the way to Transaction Relay Services which send transactions on behalf of a user to cover their gas costs.
1818

1919
This document describes the API for a Transaction Relay Service.
2020

2121
## Motivation
22+
2223
Standardizing the Transaction Relay Service API enables applications to be compatible with all Transaction Relay Services which may be built, and avoids a situation where specific applications are only compatible with specific Transaction Relay Services. This is essential for an open marketplace of Transaction Relay Services where a user can select the service which best fits their needs.
2324

2425
## Specification
2526

2627
### API
2728

28-
2929
#### POST `/execute`
3030

31-
Executes a signed transaction on behalf of a Universal Profile using `executeRelayCall()`.
31+
Executes a signed transaction on behalf of a Universal Profile using `executeRelayCall`.
32+
33+
- `address` - The address of the Universal Profile which is executing the transaction.
34+
- `transaction` - An object containing the transaction parameters which will be executed with `executeRelayCall`.
35+
- `abi` - The abi-encoded transaction data (_e.g: a function call on the Universal Profile smart contract_) which will be passed as the payload parameter to the `executeRelayCall` function.
36+
- `signature` - The signed message according to LSP6 specification.
37+
- `nonce` - The nonce of the KeyManager fetched by calling `getNonce(address address, uint128 channelId)` on the LSP6 KeyManager contract.
38+
- `validityTimestamps` (optional) - Two concatenated `uint128` timestamps which indicate a time duration for which the transaction will be considered valid. If no validityTimestamps parameter is passed the relayer should assume that validityTimestamps is `0` and the transaction will be valid indefinitely until it is executed.
3239

3340
##### Request body
3441

@@ -38,26 +45,27 @@ Executes a signed transaction on behalf of a Universal Profile using `executeRel
3845
"transaction": {
3946
"abi": "0x7f23690c5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000596f357c6aa5a21984a83b7eef4cb0720ac1fcf5a45e9d84c653d97b71bbe89b7a728c386a697066733a2f2f516d624b43744b4d7573376741524470617744687a32506a4e36616f64346b69794e436851726d3451437858454b00000000000000",
4047
"signature": "0x43c958b1729586749169599d7e776f18afc6223c7da21107161477d291d497973b4fc50a724b1b2ab98f3f8cf1d5cdbbbdf3512e4fbfbdc39732229a15beb14a1b",
41-
"nonce": 1 // KeyManager nonce
42-
},
48+
"nonce": 1, // KeyManager nonce
49+
"validityTimestamps": "0x0000000000000000000000006420f3f000000000000000000000000065ec82d0"
50+
}
4351
}
4452
```
4553

4654
##### Response
4755

4856
```json
4957
{
50-
"transactionHash": "0xBB645D97B0c7D101ca0d73131e521fe89B463BFD",
58+
"transactionHash": "0xBB645D97B0c7D101ca0d73131e521fe89B463BFD"
5159
}
5260
```
5361

5462
#### POST `/quota`
5563

5664
Returns the available quota left for a registered Universal Profile.
5765

58-
- `signature` is the result of signing a hash calculated as an EIP-712 hash where the message is keccak256(`address`, `timestamp`).
59-
- `address` is the controller address with permissions on the Universal Profile used to create the signature value.
60-
- `timestamp` represents the time the signature was created. Must be +/- 300 seconds from current time to be considered a valid request. Value should be `int`, `int256`, `uint` or `uint256`.
66+
- `signature` - The result of signing a hash calculated as an EIP-712 hash where the message is keccak256(`address`, `timestamp`).
67+
- `address` - The controller address with permissions on the Universal Profile used to create the signature value.
68+
- `timestamp` - Represents the time the signature was created. Must be +/- 300 seconds from current time to be considered a valid request. Value should be `int`, `int256`, `uint` or `uint256`.
6169

6270
##### Request body
6371

@@ -87,7 +95,6 @@ Returns the available quota left for a registered Universal Profile.
8795

8896
> Quota systems could also use a Pay As You Go model, in which case totalQuota and resetData can be omitted
8997
90-
9198
## Copyright
9299

93100
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 commit comments

Comments
 (0)