Skip to content

Commit

Permalink
Merge pull request #3 from smartcontractkit/main
Browse files Browse the repository at this point in the history
Ether Fi token balance (smartcontractkit#3690)
  • Loading branch information
PatricioMacedo authored Feb 19, 2025
2 parents 1a459f9 + b87bad3 commit 19459bf
Show file tree
Hide file tree
Showing 9 changed files with 780 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/thin-cameras-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@chainlink/view-function-multi-chain-adapter': patch
'@chainlink/token-balance-adapter': patch
---

Ether Fi
331 changes: 331 additions & 0 deletions packages/sources/token-balance/src/config/SplitMain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,331 @@
[
{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
{ "inputs": [], "name": "Create2Error", "type": "error" },
{ "inputs": [], "name": "CreateError", "type": "error" },
{
"inputs": [{ "internalType": "address", "name": "newController", "type": "address" }],
"name": "InvalidNewController",
"type": "error"
},
{
"inputs": [
{ "internalType": "uint256", "name": "accountsLength", "type": "uint256" },
{ "internalType": "uint256", "name": "allocationsLength", "type": "uint256" }
],
"name": "InvalidSplit__AccountsAndAllocationsMismatch",
"type": "error"
},
{
"inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }],
"name": "InvalidSplit__AccountsOutOfOrder",
"type": "error"
},
{
"inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }],
"name": "InvalidSplit__AllocationMustBePositive",
"type": "error"
},
{
"inputs": [{ "internalType": "uint32", "name": "allocationsSum", "type": "uint32" }],
"name": "InvalidSplit__InvalidAllocationsSum",
"type": "error"
},
{
"inputs": [{ "internalType": "uint32", "name": "distributorFee", "type": "uint32" }],
"name": "InvalidSplit__InvalidDistributorFee",
"type": "error"
},
{
"inputs": [{ "internalType": "bytes32", "name": "hash", "type": "bytes32" }],
"name": "InvalidSplit__InvalidHash",
"type": "error"
},
{
"inputs": [{ "internalType": "uint256", "name": "accountsLength", "type": "uint256" }],
"name": "InvalidSplit__TooFewAccounts",
"type": "error"
},
{
"inputs": [{ "internalType": "address", "name": "sender", "type": "address" }],
"name": "Unauthorized",
"type": "error"
},
{
"anonymous": false,
"inputs": [{ "indexed": true, "internalType": "address", "name": "split", "type": "address" }],
"name": "CancelControlTransfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "split", "type": "address" },
{
"indexed": true,
"internalType": "address",
"name": "previousController",
"type": "address"
},
{ "indexed": true, "internalType": "address", "name": "newController", "type": "address" }
],
"name": "ControlTransfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [{ "indexed": true, "internalType": "address", "name": "split", "type": "address" }],
"name": "CreateSplit",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "split", "type": "address" },
{ "indexed": true, "internalType": "contract ERC20", "name": "token", "type": "address" },
{ "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" },
{
"indexed": true,
"internalType": "address",
"name": "distributorAddress",
"type": "address"
}
],
"name": "DistributeERC20",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "split", "type": "address" },
{ "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" },
{
"indexed": true,
"internalType": "address",
"name": "distributorAddress",
"type": "address"
}
],
"name": "DistributeETH",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "split", "type": "address" },
{
"indexed": true,
"internalType": "address",
"name": "newPotentialController",
"type": "address"
}
],
"name": "InitiateControlTransfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [{ "indexed": true, "internalType": "address", "name": "split", "type": "address" }],
"name": "UpdateSplit",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "account", "type": "address" },
{ "indexed": false, "internalType": "uint256", "name": "ethAmount", "type": "uint256" },
{
"indexed": false,
"internalType": "contract ERC20[]",
"name": "tokens",
"type": "address[]"
},
{ "indexed": false, "internalType": "uint256[]", "name": "tokenAmounts", "type": "uint256[]" }
],
"name": "Withdrawal",
"type": "event"
},
{
"inputs": [],
"name": "PERCENTAGE_SCALE",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "split", "type": "address" }],
"name": "acceptControl",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "split", "type": "address" }],
"name": "cancelControlTransfer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address[]", "name": "accounts", "type": "address[]" },
{ "internalType": "uint32[]", "name": "percentAllocations", "type": "uint32[]" },
{ "internalType": "uint32", "name": "distributorFee", "type": "uint32" },
{ "internalType": "address", "name": "controller", "type": "address" }
],
"name": "createSplit",
"outputs": [{ "internalType": "address", "name": "split", "type": "address" }],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "split", "type": "address" },
{ "internalType": "contract ERC20", "name": "token", "type": "address" },
{ "internalType": "address[]", "name": "accounts", "type": "address[]" },
{ "internalType": "uint32[]", "name": "percentAllocations", "type": "uint32[]" },
{ "internalType": "uint32", "name": "distributorFee", "type": "uint32" },
{ "internalType": "address", "name": "distributorAddress", "type": "address" }
],
"name": "distributeERC20",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "split", "type": "address" },
{ "internalType": "address[]", "name": "accounts", "type": "address[]" },
{ "internalType": "uint32[]", "name": "percentAllocations", "type": "uint32[]" },
{ "internalType": "uint32", "name": "distributorFee", "type": "uint32" },
{ "internalType": "address", "name": "distributorAddress", "type": "address" }
],
"name": "distributeETH",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "split", "type": "address" }],
"name": "getController",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "account", "type": "address" },
{ "internalType": "contract ERC20", "name": "token", "type": "address" }
],
"name": "getERC20Balance",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "account", "type": "address" }],
"name": "getETHBalance",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "split", "type": "address" }],
"name": "getHash",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "split", "type": "address" }],
"name": "getNewPotentialController",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "split", "type": "address" }],
"name": "makeSplitImmutable",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address[]", "name": "accounts", "type": "address[]" },
{ "internalType": "uint32[]", "name": "percentAllocations", "type": "uint32[]" },
{ "internalType": "uint32", "name": "distributorFee", "type": "uint32" }
],
"name": "predictImmutableSplitAddress",
"outputs": [{ "internalType": "address", "name": "split", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "split", "type": "address" },
{ "internalType": "address", "name": "newController", "type": "address" }
],
"name": "transferControl",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "split", "type": "address" },
{ "internalType": "contract ERC20", "name": "token", "type": "address" },
{ "internalType": "address[]", "name": "accounts", "type": "address[]" },
{ "internalType": "uint32[]", "name": "percentAllocations", "type": "uint32[]" },
{ "internalType": "uint32", "name": "distributorFee", "type": "uint32" },
{ "internalType": "address", "name": "distributorAddress", "type": "address" }
],
"name": "updateAndDistributeERC20",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "split", "type": "address" },
{ "internalType": "address[]", "name": "accounts", "type": "address[]" },
{ "internalType": "uint32[]", "name": "percentAllocations", "type": "uint32[]" },
{ "internalType": "uint32", "name": "distributorFee", "type": "uint32" },
{ "internalType": "address", "name": "distributorAddress", "type": "address" }
],
"name": "updateAndDistributeETH",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "split", "type": "address" },
{ "internalType": "address[]", "name": "accounts", "type": "address[]" },
{ "internalType": "uint32[]", "name": "percentAllocations", "type": "uint32[]" },
{ "internalType": "uint32", "name": "distributorFee", "type": "uint32" }
],
"name": "updateSplit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "walletImplementation",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "account", "type": "address" },
{ "internalType": "uint256", "name": "withdrawETH", "type": "uint256" },
{ "internalType": "contract ERC20[]", "name": "tokens", "type": "address[]" }
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{ "stateMutability": "payable", "type": "receive" }
]
Loading

0 comments on commit 19459bf

Please sign in to comment.