Skip to content

Commit

Permalink
Merge pull request #7 from prahahackers24/design
Browse files Browse the repository at this point in the history
Design
  • Loading branch information
alexastro01 authored Jun 1, 2024
2 parents 4ee4374 + b4655b4 commit 25082dd
Show file tree
Hide file tree
Showing 22 changed files with 1,475 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ node_modules
# cli
dist
.vercel
*.zip
*.gz
Binary file not shown.
350 changes: 350 additions & 0 deletions donations/build/DonationContract/abis/DonationContract.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,350 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_batchSwapContract",
"type": "address"
},
{
"internalType": "address",
"name": "_swapRouter",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "campaignId",
"type": "uint256"
}
],
"name": "CampaignClosed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "campaignId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "campaignOwner",
"type": "address"
},
{
"indexed": false,
"internalType": "string",
"name": "campaignName",
"type": "string"
}
],
"name": "CampaignCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "campaignId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "donor",
"type": "address"
},
{
"indexed": false,
"internalType": "address[]",
"name": "tokenAddresses",
"type": "address[]"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "tokenAmounts",
"type": "uint256[]"
}
],
"name": "DonationReceived",
"type": "event"
},
{
"inputs": [],
"name": "MAX_PRICE_LIMIT",
"outputs": [
{
"internalType": "uint160",
"name": "",
"type": "uint160"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_PRICE_LIMIT",
"outputs": [
{
"internalType": "uint160",
"name": "",
"type": "uint160"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "batchSwapRouter",
"outputs": [
{
"internalType": "contract PoolBatchSwapTest",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "campaigns",
"outputs": [
{
"internalType": "address",
"name": "campaignOwner",
"type": "address"
},
{
"internalType": "bool",
"name": "isLive",
"type": "bool"
},
{
"internalType": "string",
"name": "campaignName",
"type": "string"
},
{
"internalType": "uint256",
"name": "goalAmount",
"type": "uint256"
},
{
"internalType": "address",
"name": "goalToken",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_campaignId",
"type": "uint256"
}
],
"name": "closeCampaign",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_campaignName",
"type": "string"
},
{
"internalType": "address",
"name": "goalToken",
"type": "address"
},
{
"internalType": "uint256",
"name": "goalAmount",
"type": "uint256"
}
],
"name": "createCampaign",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "_tokenAddresses",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "_tokenAmounts",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "_campaignId",
"type": "uint256"
}
],
"name": "donate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "Currency",
"name": "currency0",
"type": "address"
},
{
"internalType": "Currency",
"name": "currency1",
"type": "address"
},
{
"internalType": "uint24",
"name": "fee",
"type": "uint24"
},
{
"internalType": "int24",
"name": "tickSpacing",
"type": "int24"
},
{
"internalType": "contract IHooks",
"name": "hooks",
"type": "address"
}
],
"internalType": "struct PoolKey[]",
"name": "keys",
"type": "tuple[]"
},
{
"internalType": "int256[]",
"name": "amountsSpecified",
"type": "int256[]"
},
{
"internalType": "bool[]",
"name": "zeroForOnes",
"type": "bool[]"
}
],
"name": "makeBatchSwap",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "Currency",
"name": "currency0",
"type": "address"
},
{
"internalType": "Currency",
"name": "currency1",
"type": "address"
},
{
"internalType": "uint24",
"name": "fee",
"type": "uint24"
},
{
"internalType": "int24",
"name": "tickSpacing",
"type": "int24"
},
{
"internalType": "contract IHooks",
"name": "hooks",
"type": "address"
}
],
"internalType": "struct PoolKey",
"name": "key",
"type": "tuple"
},
{
"internalType": "int256",
"name": "amountSpecified",
"type": "int256"
},
{
"internalType": "bool",
"name": "zeroForOne",
"type": "bool"
}
],
"name": "makeSwap",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "nextCampaignId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "swapRouter",
"outputs": [
{
"internalType": "contract PoolSwapTest",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
28 changes: 28 additions & 0 deletions donations/build/schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
type CampaignClosed @entity(immutable: true) {
id: Bytes!
campaignId: BigInt! # uint256
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type CampaignCreated @entity(immutable: true) {
id: Bytes!
campaignId: BigInt! # uint256
campaignOwner: Bytes! # address
campaignName: String! # string
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type DonationReceived @entity(immutable: true) {
id: Bytes!
campaignId: BigInt! # uint256
donor: Bytes! # address
# tokenAddresses: [Bytes!]! # address[]
tokenAmounts: [BigInt!]! # uint256[]
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
Loading

0 comments on commit 25082dd

Please sign in to comment.