Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
feat(clever): implement vesting (#2292)
Browse files Browse the repository at this point in the history
* regenerate contract code

* feat(clever): added clev vesting
  • Loading branch information
4E-69-63-6B-20-42-6F-73 committed Feb 12, 2023
1 parent a48ffe3 commit b5a6486
Show file tree
Hide file tree
Showing 12 changed files with 1,954 additions and 611 deletions.
2 changes: 2 additions & 0 deletions src/apps/clever/clever.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import { CleverContractFactory } from './contracts';
import { EthereumCleverFurnaceContractPositionFetcher } from './ethereum/clever.furnace.contract-position-fetcher';
import { EthereumCleverLeverTokenFetcher } from './ethereum/clever.lever.token-fetcher';
import { EthereumCleverLockContractPositionFetcher } from './ethereum/clever.lock.contract-position-fetcher';
import { EthereumCleverVestingContractPositionFetcher } from './ethereum/clever.vesting.contract-position-fetcher';

@Module({
providers: [
CleverContractFactory,
EthereumCleverLeverTokenFetcher,
EthereumCleverFurnaceContractPositionFetcher,
EthereumCleverLockContractPositionFetcher,
EthereumCleverVestingContractPositionFetcher,
],
})
export class CleverAppModule extends AbstractApp() {}
166 changes: 166 additions & 0 deletions src/apps/clever/contracts/abis/clever-vesting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
[
{
"inputs": [{ "internalType": "address", "name": "_token", "type": "address" }],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "_recipient", "type": "address" },
{ "indexed": true, "internalType": "uint256", "name": "_index", "type": "uint256" },
{ "indexed": false, "internalType": "uint256", "name": "_unvested", "type": "uint256" },
{ "indexed": false, "internalType": "uint256", "name": "_cancleTime", "type": "uint256" }
],
"name": "Cancle",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "_recipient", "type": "address" },
{ "indexed": false, "internalType": "uint256", "name": "_amount", "type": "uint256" }
],
"name": "Claim",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
{ "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "_recipient", "type": "address" },
{ "indexed": true, "internalType": "uint256", "name": "_index", "type": "uint256" },
{ "indexed": false, "internalType": "uint256", "name": "_amount", "type": "uint256" },
{ "indexed": false, "internalType": "uint256", "name": "_startTime", "type": "uint256" },
{ "indexed": false, "internalType": "uint256", "name": "_endTime", "type": "uint256" }
],
"name": "Vest",
"type": "event"
},
{
"inputs": [
{ "internalType": "address", "name": "_user", "type": "address" },
{ "internalType": "uint256", "name": "_index", "type": "uint256" }
],
"name": "cancle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "claim",
"outputs": [{ "internalType": "uint256", "name": "_claimable", "type": "uint256" }],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "_recipient", "type": "address" }],
"name": "getUserVest",
"outputs": [
{
"components": [
{ "internalType": "uint128", "name": "vestingAmount", "type": "uint128" },
{ "internalType": "uint128", "name": "claimedAmount", "type": "uint128" },
{ "internalType": "uint64", "name": "startTime", "type": "uint64" },
{ "internalType": "uint64", "name": "endTime", "type": "uint64" },
{ "internalType": "uint64", "name": "cancleTime", "type": "uint64" }
],
"internalType": "struct Vesting.VestState[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
"name": "isWhitelist",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "_recipient", "type": "address" }],
"name": "locked",
"outputs": [{ "internalType": "uint256", "name": "_unvested", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "_recipient", "type": "address" },
{ "internalType": "uint128", "name": "_amount", "type": "uint128" },
{ "internalType": "uint64", "name": "_startTime", "type": "uint64" },
{ "internalType": "uint64", "name": "_endTime", "type": "uint64" }
],
"name": "newVesting",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{ "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
{
"inputs": [],
"name": "token",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address[]", "name": "_accounts", "type": "address[]" },
{ "internalType": "bool", "name": "_status", "type": "bool" }
],
"name": "updateWhitelist",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "_recipient", "type": "address" }],
"name": "vested",
"outputs": [{ "internalType": "uint256", "name": "_vested", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "", "type": "address" },
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"name": "vesting",
"outputs": [
{ "internalType": "uint128", "name": "vestingAmount", "type": "uint128" },
{ "internalType": "uint128", "name": "claimedAmount", "type": "uint128" },
{ "internalType": "uint64", "name": "startTime", "type": "uint64" },
{ "internalType": "uint64", "name": "endTime", "type": "uint64" },
{ "internalType": "uint64", "name": "cancleTime", "type": "uint64" }
],
"stateMutability": "view",
"type": "function"
}
]
Loading

0 comments on commit b5a6486

Please sign in to comment.