Skip to content

Commit

Permalink
Programs + Latest contract changes (#2260)
Browse files Browse the repository at this point in the history
* add programs route

* fix active countries spacing

* programs header

* create program page and route

* create program form

* not-submitting

* create program wiring

* fix typechain error

* update contract addresses

* remove cached git file

* update endow query abi

* program list

* list skeleton

* program list

* initial state from link

* program as state

* admin style updates

* edit program

* button names

* temp disable delete

* programs
  • Loading branch information
ap-justin authored Jul 18, 2023
1 parent 1c3c575 commit d5eaa0e
Show file tree
Hide file tree
Showing 33 changed files with 502 additions and 82 deletions.
4 changes: 3 additions & 1 deletion src/components/ImgEditor/ImgEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export default function ImgEditor<T extends FieldValues, K extends keyof T>(
ref,
})}
style={{
background: `url('${preview}') center/cover no-repeat`,
background: preview
? `url('${preview}') center/cover no-repeat`
: undefined,
}}
>
{noneUploaded ? (
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/TemplateContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function GroupContainer({
}: PropsWithChildren<{ className?: string }>) {
return (
<div
className={`p-3 pb-6 grid gap-6 rounded bg-orange-l6 dark:bg-blue-d7 border border-prim ${className}`}
className={`p-3 pb-6 grid gap-6 rounded bg-gray-l6 dark:bg-blue-d5 border border-prim ${className}`}
>
{children}
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/constants/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ const mainnet:Contracts = {

//prettier-ignore
const testnet:Contracts = {
registrar: "0x982B2Ce3a8D014Af81F0F7122f3E634F3E1aFbee",
"index-fund": "0xd3e8AC29422D8C180E89405879C5C6766e9528C8",
"multisig/ap": "0x8669Fd38E434C0724834F4b995B85bD50831E7c7",
"multisig/review": "0x824F03DdEB9a7cd6852AA156392e358ACC79924b",
accounts: "0xc2bA254F7De519ef72C4f69Aa4843e89B6F8483d",
registrar: "0xe1215B3e150dd298d787D41a4879959D30Dc3939",
"index-fund": "0xf6B32b4a0371050321fC01672FDfad76aF55603f",
"multisig/ap": "0xeA2B4CD932f5Cecea867D8794206c5D51A13a516",
"multisig/review": "0x3769916a8c97FFf1C48DE49b03181578576aFdF1",
accounts: "0xE2e48880d780c4Fa36655EC9014DBbdA1164C0cA",
"gift-card": "0x47e49a7700c9D79412bb47385eD349106d4941F9",
}

Expand Down
2 changes: 2 additions & 0 deletions src/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export const adminRoutes = {
admin_wallet: "admin-wallet",
//charity
edit_profile: "edit-profile",
programs: "programs",
create_program: "create-program",
withdraws: "withdraws",
deposits: "deposits",
// settings: "settings",
Expand Down
94 changes: 47 additions & 47 deletions src/contracts/evm/Account/abi/queries/endowment.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"type": "uint256[]"
},
{
"internalType": "enum AngelCoreStruct.Tier",
"internalType": "enum LibAccounts.Tier",
"name": "tier",
"type": "uint8"
},
{
"internalType": "enum AngelCoreStruct.EndowmentType",
"internalType": "enum LibAccounts.EndowmentType",
"name": "endowType",
"type": "uint8"
},
Expand Down Expand Up @@ -88,11 +88,6 @@
"name": "rebalance",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "pendingRedemptions",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "proposalLink",
Expand Down Expand Up @@ -151,7 +146,7 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.FeeSetting",
"internalType": "struct LibAccounts.FeeSetting",
"name": "earlyLockedWithdrawFee",
"type": "tuple"
},
Expand All @@ -168,7 +163,7 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.FeeSetting",
"internalType": "struct LibAccounts.FeeSetting",
"name": "withdrawFee",
"type": "tuple"
},
Expand All @@ -185,7 +180,7 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.FeeSetting",
"internalType": "struct LibAccounts.FeeSetting",
"name": "depositFee",
"type": "tuple"
},
Expand All @@ -202,7 +197,7 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.FeeSetting",
"internalType": "struct LibAccounts.FeeSetting",
"name": "balanceFee",
"type": "tuple"
},
Expand All @@ -228,12 +223,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "acceptedTokens",
"type": "tuple"
},
Expand All @@ -257,12 +252,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "lockedInvestmentManagement",
"type": "tuple"
},
Expand All @@ -286,12 +281,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "liquidInvestmentManagement",
"type": "tuple"
},
Expand All @@ -315,12 +310,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "allowlistedBeneficiaries",
"type": "tuple"
},
Expand All @@ -344,12 +339,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "allowlistedContributors",
"type": "tuple"
},
Expand All @@ -373,12 +368,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "maturityAllowlist",
"type": "tuple"
},
Expand All @@ -402,12 +397,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "maturityTime",
"type": "tuple"
},
Expand All @@ -431,12 +426,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "earlyLockedWithdrawFee",
"type": "tuple"
},
Expand All @@ -460,12 +455,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "withdrawFee",
"type": "tuple"
},
Expand All @@ -489,12 +484,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "depositFee",
"type": "tuple"
},
Expand All @@ -518,12 +513,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "balanceFee",
"type": "tuple"
},
Expand All @@ -547,12 +542,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "name",
"type": "tuple"
},
Expand All @@ -576,12 +571,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "image",
"type": "tuple"
},
Expand All @@ -605,12 +600,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "logo",
"type": "tuple"
},
Expand All @@ -634,12 +629,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "sdgs",
"type": "tuple"
},
Expand All @@ -663,12 +658,12 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "splitToLiquid",
"type": "tuple"
},
Expand All @@ -692,17 +687,17 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.Delegate",
"internalType": "struct LibAccounts.Delegate",
"name": "delegate",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsPermission",
"internalType": "struct LibAccounts.SettingsPermission",
"name": "ignoreUserSplits",
"type": "tuple"
}
],
"internalType": "struct AngelCoreStruct.SettingsController",
"internalType": "struct LibAccounts.SettingsController",
"name": "settingsController",
"type": "tuple"
},
Expand Down Expand Up @@ -734,14 +729,19 @@
"type": "uint256"
}
],
"internalType": "struct AngelCoreStruct.SplitDetails",
"internalType": "struct LibAccounts.SplitDetails",
"name": "splitToLiquid",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "referralId",
"type": "uint256"
},
{
"internalType": "address",
"name": "gasFwd",
"type": "address"
}
],
"internalType": "struct AccountStorage.Endowment",
Expand Down
Loading

0 comments on commit d5eaa0e

Please sign in to comment.