Skip to content
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

new form integrations #17

Open
wants to merge 3 commits into
base: main
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Install dependencies
pnpm i
```

Copy `.env.example` to `.env.local` and set the NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID, NEXT_PUBLIC_INFURA_ID, SESSION_SECRET, NEXT_PUBLIC_CONTRACT_ADDRESS, NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_SECRET, NEXT_PUBLIC_PINATA_API_KEY.
Copy `.env.example` to `.env.local` and set the NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID, NEXT_PUBLIC_INFURA_ID, SESSION_SECRET, NEXT_PUBLIC_CONTRACT_ADDRESS, NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_SECRET, NEXT_PUBLIC_PINATA_API_KEY, NEXT_PUBLIC_PINATA_SECRET_API_KEY, NEXT_WEAVE_CONTRACT_ADDRESS, NEXT_WEAVE_LEADERBOARD_CONTRACT_ADDRESS, NEXT_WEAVE_EVENTS_FACTORY_CONTRACT_ADDRESS.

To get a WalletConnect project ID, go to [https://cloud.walletconnect.com/sign-in](https://cloud.walletconnect.com/sign-in)
Here also the link for Infura : [https://app.infura.io/](https://app.infura.io/)
Expand All @@ -36,9 +36,9 @@ openssl rand -base64 32
|------------------------|--------------------------------------------|
| Weave Contract | 0x5f856baB0F63a833b311fC9d853a14c8762d583d |
| Leaderboard Contract | 0x39545602B72Bd4a74FE1f4AF755c15C71C9780F0 |
| Vault Contract | 0x6a6C3b42e1af8BCd9adD11DFaDb9ab8445497914 |
| Event Factory Contract | 0x815257a8A46F2dE5F812DC3232CC0C0c24A7252a |
| Event Contract | X |
| Vault Contract | 0x4BE0E8654e9879877e8A806B839fE122fa0F880C |
| Event Factory Contract | 0x729D4b69401b651f6C868e169C42cb82d6C37F43 |
| Event Contract | 0xA225B8813a3D298b0fA5dD6357f4843B224A4678 |

## Stack

Expand Down
13 changes: 13 additions & 0 deletions contracts/contracts/EventsFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,19 @@ contract EventFactory is Ownable {
return IEvent(_eventAddress).getManagers();
}

function getAllEventManagers() external view returns (address[] memory) {
address[] memory allEventManagers = new address[](allEvents.length * 5);
uint256 counter = 0;
for (uint256 i = 0; i < allEvents.length; i++) {
address[] memory eventManagers = IEvent(allEvents[i]).getManagers();
for (uint256 j = 0; j < eventManagers.length; j++) {
allEventManagers[counter] = eventManagers[j];
counter++;
}
}
return allEventManagers;
}

function calculatingPriceToCreate(uint256 _eventStartDate, uint256 _eventEndDate, uint256 _eventRadius) internal pure returns (uint256) {
return ((_eventEndDate - _eventStartDate) / 86400 * 100) + (_eventRadius / 100);
}
Expand Down
Loading