Skip to content

Add ERC4626 & Kiln DeFi registry #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion developer-preview/src/app/PreviewTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function PreviewTool({ jsonInRegistry }: Props) {
setSelectedDevice(storedDevice);
}
setFileKey(
localStorage.getItem("selectedFileKey") ?? "calldata-PoapBridge.json",
localStorage.getItem("selectedFileKey") ?? "/poap/calldata-PoapBridge.json",
);
}, [previewData?.operations]);

Expand Down
331 changes: 331 additions & 0 deletions ercs/calldata-erc4626-vaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,331 @@
{
"$schema": "../specs/erc7730-v1.schema.json",
"context": {
"contract" : {
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "deposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "withdraw",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "mint",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "redeem",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
]
}
},

"display": {
"definitions": {
"asset_deposit": {
"label": "Deposit",
"format": "tokenAmount",
"params": {
"tokenPath": "$.context.contract.deployments.[0].asset"
}
},
"asset_withdraw": {
"label": "Withdraw",
"format": "tokenAmount",
"params": {
"tokenPath": "$.context.contract.deployments.[0].asset"
}
},
"shares_mint": {
"label": "Mint shares",
"format": "tokenAmount",
"params": {
"tokenPath": "$.context.contract.deployments.[0].address"
}
},
"shares_redeem": {
"label": "Withdraw shares",
"format": "tokenAmount",
"params": {
"tokenPath": "$.context.contract.deployments.[0].address"
}
},
"from" : {
"label": "From",
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
},
"receiver" : {
"label": "Receiver",
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
},
"vault":{
"label": "Vault",
"format": "addressName",
"params": {
"types": [
"contract"
],
"sources": [
"local",
"ens"
]
}
}
},
"formats": {
"transfer(address,uint256)": {
"intent": "Send",
"fields": [
{
"path": "_to",
"label": "To",
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
},
{
"path": "_value",
"label": "Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "$.context.contract.deployments.[0].address"
}
}
],
"required": ["_to", "_value"]
},
"approve(address,uint256)": {
"intent": "Approve",
"fields": [
{
"path": "_spender",
"label": "Spender",
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
},
{
"path": "_value",
"label": "Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "$.context.contract.deployments.[0].address",
"threshold": "0x8000000000000000000000000000000000000000000000000000000000000000"
}
}
],
"required": ["_spender", "_value"]
},
"deposit(uint256 assets, address receiver)": {
"intent": "Deposit",
"fields": [
{ "path": "_to", "$ref": "$.display.definitions.vault" },
{ "path": "_assets", "$ref": "$.display.definitions.asset_deposit" },
{ "path": "_receiver", "$ref": "$.display.definitions.receiver" }
],
"required": ["_to", "_assets", "_receiver"]
},
"withdraw(uint256 assets, address receiver, address owner)":{
"intent": "Withdraw",
"fields": [
{ "path": "_to", "$ref": "$.display.definitions.vault" },
{ "path": "_assets", "$ref": "$.display.definitions.asset_withdraw" },
{ "path": "_receiver", "$ref": "$.display.definitions.receiver" }
],
"required": ["_to", "_assets", "_receiver"]
},
"mint(uint256 shares, address receiver)":{
"intent": "Mint shares",
"fields": [
{ "path": "_to", "$ref": "$.display.definitions.vault" },
{ "path": "_shares", "$ref": "$.display.definitions.shares_mint" },
{ "path": "_receiver", "$ref": "$.display.definitions.receiver" }
],
"required": ["_to", "_assets", "_receiver"]
},
"redeem(uint256 shares, address receiver, address owner)":{
"intent": "Withdraw from shares",
"fields": [
{ "path": "_to", "$ref": "$.display.definitions.vault" },
{ "path": "_shares", "$ref": "$.display.definitions.shares_redeem" },
{ "path": "_receiver", "$ref": "$.display.definitions.receiver" }
],
"required": ["_to", "_assets", "_receiver"]
}
}
}
}
32 changes: 32 additions & 0 deletions registry/kiln/calldata-erc4626-kiln-defi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{

Check failure on line 1 in registry/kiln/calldata-erc4626-kiln-defi.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid value at

* Value "{'$id': 'Kiln DeFi', 'contract': {'deployments': [{'chainId': 1, 'address': '0x9c57487a16923dC8EE719c7A9940dE78c605967C', 'asset': '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'}, {'chainId': 11155111, 'address': '0xf3a9A790f84B2E0301069BE589fc976Cf3eB5661', 'asset': '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'}], 'abi': [{'constant': False, 'inputs': [{'name': '_spender', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': False, 'inputs': [{'name': '_to', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'assets', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}], 'name': 'deposit', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'assets', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}, {'internalType': 'address', 'name': 'owner', 'type': 'address'}], 'name': 'withdraw', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'shares', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}], 'name': 'mint', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'shares', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}, {'internalType': 'address', 'name': 'owner', 'type': 'address'}], 'name': 'redeem', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}]}}" is not valid: Field required * Value "{'deployments': [{'chainId': 1, 'address': '0x9c57487a16923dC8EE719c7A9940dE78c605967C', 'asset': '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'}, {'chainId': 11155111, 'address': '0xf3a9A790f84B2E0301069BE589fc976Cf3eB5661', 'asset': '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'}], 'abi': [{'constant': False, 'inputs': [{'name': '_spender', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': False, 'inputs': [{'name': '_to', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'assets', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}], 'name': 'deposit', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'assets', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}, {'internalType': 'address', 'name': 'owner', 'type': 'address'}], 'name': 'withdraw', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'shares', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}], 'name': 'mint', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'shares', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', '

Check failure on line 1 in registry/kiln/calldata-erc4626-kiln-defi.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid value at 0

Value "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" is not valid: Extra inputs are not permitted

Check failure on line 1 in registry/kiln/calldata-erc4626-kiln-defi.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid value at 1

Value "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" is not valid: Extra inputs are not permitted
"$schema": "../../specs/erc7730-v1.schema.json",

"context": {
"$id": "Kiln DeFi",
"contract" : {
"deployments": [
{
"chainId": 1,
"address": "0x9c57487a16923dC8EE719c7A9940dE78c605967C",
"asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
},
{
"chainId": 11155111,
"address": "0xf3a9A790f84B2E0301069BE589fc976Cf3eB5661",
"asset": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"
}
]
}
},

"includes": "../../ercs/calldata-erc4626-vaults.json",

"metadata": {
"owner": "Kiln",
"info": {
"legalName": "Kiln",
"url": "https://kiln.fi/",
"lastUpdate": "2024-10-16T12:41:21Z"
}
}
}
Loading