Skip to content

Commit

Permalink
Merge branch 'master' into feat/1inch-aggragators
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicoulaud-ledger authored Oct 21, 2024
2 parents e13f437 + 13b6249 commit 7a89c5f
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ercs/calldata-erc20-tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"label": "Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "$.context.contract.address"
"tokenPath": "$.context.contract.deployments.[0].address"
}
}
],
Expand All @@ -86,7 +86,7 @@
"label": "Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "$.context.contract.address",
"tokenPath": "$.context.contract.deployments.[0].address",
"threshold": "0x8000000000000000000000000000000000000000000000000000000000000000"
}
}
Expand Down
8 changes: 4 additions & 4 deletions ercs/calldata-erc721-nfts.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@
"label": "Collection",
"format": "addressName",
"params": {
"type": "nft"
"types": ["collection"]
}
},
{ "path": "_operator", "$ref": "$.display.definitions.operator" },
{
{
"path": "_approved",
"label": "Access rights",
"label": "Access rights",
"format": "enum",
"$params": { "$ref": "$.metadata.enums.rights" }
"params": { "$ref": "$.metadata.enums.rights" }
}
]
}
Expand Down
162 changes: 162 additions & 0 deletions registry/lido/calldata-OssifiableProxy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"$schema": "../../specs/erc7730-v1.schema.json",

"context": {
"$id": "OssifiableProxy",
"contract": {
"deployments": [
{
"chainId": 1,
"address": "0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1"
}
],
"abi": "https://github.com/LedgerHQ/ledger-asset-dapps/blob/2eb3482cb1311f828a88e417c5095b9bbbc43fee/ethereum/lido/abis/0x889edc2edab5f40e902b864ad4d7ade8e412f9b1.abi.json"
}
},

"metadata": {
"owner": "Lido",
"info": {
"url": "https://lido.fi",
"legalName": "Lido DAO",
"lastUpdate": "2023-05-02T10:38:47Z"
},
"constants": {
"stETHaddress": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
"wstETHaddress": "0x0B925eD163218f6662a35e0f0371Ac234f9E9371"
}
},

"display": {
"formats": {
"requestWithdrawalsWstETH(uint256[] _amounts, address _owner)": {
"intent": "Request withdrawals",
"fields": [
{
"path": "_amounts.[]",
"label": "Amount to withdraw",
"format": "tokenAmount",
"params": {
"tokenPath": "$.metadata.constants.wstETHaddress"
}
},
{
"path": "_owner",
"label": "Beneficiary",
"format": "addressName"
}
],
"required": ["_amounts", "_owner"]
},
"requestWithdrawalsWstETHWithPermit(uint256[] _amounts, address _owner, (uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) _permit)": {
"intent": "Request withdrawals",
"fields": [
{
"path": "_amounts.[]",
"label": "Amount to withdraw",
"format": "tokenAmount",
"params": {
"tokenPath": "$.metadata.constants.wstETHaddress"
}
},
{
"path": "_owner",
"label": "Beneficiary",
"format": "addressName"
}
],
"required": ["_amounts", "_owner"],
"excluded": ["_permit.value", "_permit.deadline", "_permit.v", "_permit.r", "_permit.s"]
},
"requestWithdrawals(uint256[] _amounts, address _owner)": {
"intent": "Request withdrawals",
"fields": [
{
"path": "_amounts.[]",
"label": "Amount to withdraw",
"format": "tokenAmount",
"params": {
"tokenPath": "$.metadata.constants.stETHaddress"
}
},
{
"path": "_owner",
"label": "Beneficiary",
"format": "addressName"
}
],
"required": ["_amounts", "_owner"]
},
"requestWithdrawalsWithPermit(uint256[] _amounts, address _owner, (uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) _permit)": {
"intent": "Request withdrawals",
"fields": [
{
"path": "_amounts.[]",
"label": "Amount to withdraw",
"format": "tokenAmount",
"params": {
"tokenPath": "$.metadata.constants.stETHaddress"
}
},
{
"path": "_owner",
"label": "Beneficiary",
"format": "addressName"
}
],
"required": ["_amounts", "_owner"],
"excluded": ["_permit.value", "_permit.deadline", "_permit.v", "_permit.r", "_permit.s"]
},
"claimWithdrawal(uint256 _requestId)": {
"intent": "Claim withdrawal",
"fields": [
{
"path": "_requestId",
"label": "Request ID",
"format": "raw"
},
{
"path": "@.from",
"label": "Beneficiary",
"format": "addressName"
}
],
"required": ["_requestId", "@.from"]
},
"claimWithdrawals(uint256[] _requestIds, uint256[] _hints)": {
"intent": "Claim withdrawals",
"fields": [
{
"path": "_requestIds.[]",
"label": "Request ID",
"format": "raw"
},
{
"path": "@.from",
"label": "Beneficiary",
"format": "addressName"
}
],
"required": ["_requestIds", "@.from"],
"excluded": ["_hints"]
},
"claimWithdrawalsTo(uint256[] _requestIds, uint256[] _hints, address _recipient)": {
"intent": "Claim withdrawals",
"fields": [
{
"path": "_requestIds.[]",
"label": "Request ID",
"format": "raw"
},
{
"path": "_recipient",
"label": "Beneficiary",
"format": "addressName"
}
],
"required": ["_requestIds", "_recipient"],
"excluded": ["_hints"]
}
}
}
}
4 changes: 2 additions & 2 deletions registry/lido/calldata-stETH.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"intent": "Stake ETH",
"fields": [
{
"path": "@.amount",
"path": "@.value",
"label": "Amount to Stake",
"format": "amount"
},
Expand All @@ -39,7 +39,7 @@
"format": "addressName"
}
],
"required": ["@.amount"]
"required": ["@.value"]
},
"approve(address,uint256)" : {
"intent": "Approve a spender",
Expand Down
2 changes: 1 addition & 1 deletion specs/erc-7730.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ References to values in the format specification file
* `$.display.definitions.minReceiveAmount` refers to a common definition reused accross fields formatting definition

References to values in the container (here a EVM Tx container)
* `@.amount` refers to the enclosing transaction native currency amount
* `@.value` refers to the enclosing transaction native currency amount
* `@.to` refers to the enclosing transaction destination address (usually, a smartcontract bound to this ERC-7730 through the `context` section)

#### Organizing files
Expand Down
2 changes: 1 addition & 1 deletion specs/erc7730-v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"type": "object",
"description": "A set of values that can be used in format parameters. Can be referenced with a path expression like $.metadata.constants.CONSTANT_NAME",
"additionalProperties": {
"type": "string"
"type": ["string", "integer", "number", "boolean", "null"]
}
},

Expand Down

0 comments on commit 7a89c5f

Please sign in to comment.