Skip to content

Commit

Permalink
add libertify on polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarcot committed Sep 22, 2023
1 parent 611d2b9 commit 2f3f03d
Show file tree
Hide file tree
Showing 2 changed files with 270 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_wethAddr",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "BadData",
"type": "error"
},
{
"inputs": [],
"name": "BadReceiver",
"type": "error"
},
{
"inputs": [],
"name": "BadReturn",
"type": "error"
},
{
"inputs": [],
"name": "BadSelector",
"type": "error"
},
{
"inputs": [],
"name": "BadSymbol",
"type": "error"
},
{
"inputs": [],
"name": "BadToken",
"type": "error"
},
{
"inputs": [],
"name": "BadValue",
"type": "error"
},
{
"inputs": [],
"name": "FailedTransfer",
"type": "error"
},
{
"inputs": [],
"name": "UnevenSwap",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "address",
"name": "srcToken",
"type": "address"
},
{
"internalType": "address",
"name": "vaultAddr",
"type": "address"
},
{
"internalType": "bytes[]",
"name": "data",
"type": "bytes[]"
}
],
"name": "deposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "address",
"name": "srcToken",
"type": "address"
},
{
"internalType": "address",
"name": "vaultAddr",
"type": "address"
},
{
"internalType": "string",
"name": "vaultSymbol",
"type": "string"
},
{
"internalType": "bytes[]",
"name": "data",
"type": "bytes[]"
}
],
"name": "depositWithSymbolCheck",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "address",
"name": "vaultAddr",
"type": "address"
}
],
"name": "previewWithdraw",
"outputs": [
{
"internalType": "address[]",
"name": "tokens",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "amountsOut",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "address",
"name": "dstToken",
"type": "address"
},
{
"internalType": "address",
"name": "vaultAddr",
"type": "address"
},
{
"internalType": "uint256",
"name": "minAmountOut",
"type": "uint256"
},
{
"internalType": "bytes[]",
"name": "data",
"type": "bytes[]"
}
],
"name": "withdraw",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
},
{
"internalType": "address",
"name": "dstToken",
"type": "address"
},
{
"internalType": "address",
"name": "vaultAddr",
"type": "address"
},
{
"internalType": "uint256",
"name": "minAmountOut",
"type": "uint256"
},
{
"internalType": "string",
"name": "vaultSymbol",
"type": "string"
},
{
"internalType": "bytes[]",
"name": "data",
"type": "bytes[]"
}
],
"name": "withdrawWithSymbolCheck",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]
27 changes: 27 additions & 0 deletions polygon/libertify/b2c.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"blockchainName": "polygon",
"chainId": 137,
"contracts": [
{
"address": "0x9f4294dc2ba0e4569cbfa3d8a0a5f2f23385db50",
"contractName": "LibertiV2Proxy",
"selectors": {
"0xa2922622": {
"erc20OfInterest": [
"dstToken"
],
"method": "withdrawWithSymbolCheck",
"plugin": "libertify"
},
"0xaa2daba6": {
"erc20OfInterest": [
"srcToken"
],
"method": "depositWithSymbolCheck",
"plugin": "libertify"
}
}
}
],
"name": "libertify"
}

0 comments on commit 2f3f03d

Please sign in to comment.