Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dcgtc/dgrants
/ functions
Functions
196 in github.com/dcgtc/dgrants
⨍
Functions
196
◇
Types & classes
17
↓ 54 callers
Function
balanceOf
(tokenSymbol: SupportedToken, address: string)
contracts/test/utils.ts:152
↓ 28 callers
Function
approve
(tokenSymbol: SupportedToken, holder: SignerWithAddress, spender: string)
contracts/test/utils.ts:162
↓ 27 callers
Function
randomAddress
()
contracts/test/GrantRegistry.test.ts:15
↓ 20 callers
Function
setBalance
(tokenSymbol: SupportedToken, to: string, amount: BigNumberish)
contracts/test/utils.ts:172
↓ 15 callers
Function
randomPtr
()
contracts/test/GrantRegistry.test.ts:16
↓ 13 callers
Function
BN
(x: BigNumberish)
contracts/test/GrantRegistry.test.ts:17
↓ 13 callers
Function
snapshotGasCost
( x: | TransactionResponse | Promise<TransactionResponse> | ContractTransaction | Promise<Co
contracts/test/snapshotGasCost.ts:5
↓ 12 callers
Function
createGrant
(owner: string, payee: string, metaPtr: MetaPtr, user?: SignerWithAddress)
contracts/test/GrantRegistry.test.ts:33
↓ 12 callers
Function
encodeRoute
(tokens: SupportedToken[])
contracts/test/utils.ts:105
↓ 11 callers
Function
metadataId
(metaPtr: MetaPtr = { protocol: 0, pointer: '' })
app/src/utils/utils.ts:88
↓ 11 callers
Function
save
(key: string, value: any)
app/src/store/settings.ts:14
↓ 10 callers
Function
expectEqualGrants
(grant1: GrantEthers, grant2: GrantEthers)
contracts/test/utils.ts:45
↓ 10 callers
Function
getSwapAmountOut
(logs: Log[])
contracts/test/utils.ts:71
↓ 10 callers
Function
syncStorage
( key: string, meta: LocalForageAnyObj, callback: ( LocalForageData?: LocalForageData, save?: (s
app/src/utils/data/utils.ts:19
↓ 9 callers
Function
setCart
* @notice Update the cart store with the provided `newCart` * @dev Regardless if input type, the most recent grant data will be fetched from the da
app/src/store/cart.ts:123
↓ 8 callers
Function
encodeRoutePolygon
(tokens: SupportedToken[])
contracts/test/utils.ts:94
↓ 8 callers
Method
recordAction
(name: string, content: string)
contracts/scripts/ScriptLogger.ts:60
↓ 8 callers
Function
useWalletStore
()
app/src/store/wallet.ts:65
↓ 7 callers
Function
formatNumber
(value: BigNumberish, decimals: number)
app/src/utils/utils.ts:36
↓ 7 callers
Method
getProof
(el: Buffer)
utils/src/merkle-distributor/merkle-tree.ts:72
↓ 7 callers
Function
randomAddress
()
contracts/test/GrantRoundManager.test.ts:23
↓ 7 callers
Function
randomAddress
()
contracts/test/polygon/GrantRoundManagerUniV2.test.ts:26
↓ 6 callers
Function
getStorageKey
(key: string, useStorage?: LocalForage)
app/src/utils/data/utils.ts:67
↓ 6 callers
Function
setStorageKey
(key: string, value: LocalForageData, useStorage?: LocalForage)
app/src/utils/data/utils.ts:74
↓ 5 callers
Function
batchFilterCall
(query: BatchFilterQuery, startBlock: number, endBlock: number)
app/src/utils/utils.ts:364
↓ 5 callers
Function
deployGrantRound
( matchingTokenSupply: string, donationTokenSupply: string, newStartTime?: number, newEndTime?
contracts/test/GrantRound.test.ts:33
↓ 4 callers
Function
configureProvider
()
app/src/store/wallet.ts:155
↓ 4 callers
Function
fetch
(args: GrantRoundFetchArgs)
dcurve/src/internal/fetch.ts:17
↓ 4 callers
Function
getInputToken
* @notice Decodes the swap path for Uniswap V3 and Uniswap V2 style swaps to return the input token * @param swap Swap details * @returns Checksumme
app/src/store/cart.ts:509
↓ 4 callers
Function
isPolygon
()
contracts/test/utils.ts:205
↓ 4 callers
Function
notifyUser
(alertType: NotificationType, message: string)
app/src/utils/alerts.ts:46
↓ 4 callers
Function
recursiveGraphFetch
( url: string, key: string, query: (filter: string) => string, fromBlock: number, additionalFilter =
app/src/utils/utils.ts:451
↓ 4 callers
Function
setNextBlockTimestamp
(timestamp: BigNumberish)
contracts/test/utils.ts:63
↓ 3 callers
Function
checkIsDeployed
* @notice Check if a given contract has been deployed on the default provider
app/src/store/data.ts:88
↓ 3 callers
Function
createIpfs
(fleekApiKey: string)
utils/src/ipfs.ts:5
↓ 3 callers
Function
decodeMetadataId
(id: string)
app/src/utils/utils.ts:97
↓ 3 callers
Function
fetchMetaPtrs
(metaPtrs: MetaPtr[], metadata: Ref)
app/src/utils/data/ipfs.ts:78
↓ 3 callers
Function
generateMerkle
(distribution: PayoutMatch[], matchingTokenDecimals: number)
dcurve/src/internal/merkle.ts:18
↓ 3 callers
Function
getGrantRoundGrantData
( blockNumber: number, contributions: Contribution[], trustBonus: { [address: string]: number }, grant
app/src/utils/data/grantRounds.ts:372
↓ 3 callers
Function
getMetaPtr
({ cid }: { cid: string | undefined })
app/src/utils/data/ipfs.ts:47
↓ 3 callers
Function
getMetadata
(metaPtr: MetaPtr, metadata: Ref)
app/src/utils/data/ipfs.ts:109
↓ 3 callers
Function
getTokensMapping
()
contracts/test/utils.ts:210
↓ 3 callers
Function
handleError
(err: Error, msg = 'An unknown error occurred')
app/src/utils/alerts.ts:71
↓ 3 callers
Function
ptrToURI
(logoPtr: MetaPtr)
app/src/utils/utils.ts:103
↓ 3 callers
Function
timeTravel
(seconds: BigNumberish)
contracts/test/utils.ts:57
↓ 3 callers
Method
toNode
(index: number | BigNumber, account: string, amount: BigNumber)
utils/src/merkle-distributor/balance-tree.ts:31
↓ 3 callers
Function
updateGrantRound
* @notice Pull new GrantRound details and update refs
app/src/utils/data/grantRounds.ts:546
↓ 2 callers
Function
assertIPFSPointer
(logoPtr: MetaPtr | undefined)
app/src/utils/data/ipfs.ts:11
↓ 2 callers
Method
combinedHash
(first: Buffer, second: Buffer)
utils/src/merkle-distributor/merkle-tree.ts:53
↓ 2 callers
Function
confirmContinue
(params: Record<string, unknown>)
contracts/tasks/execute-payouts.ts:148
↓ 2 callers
Method
confirmContinue
()
contracts/scripts/ScriptLogger.ts:33
↓ 2 callers
Function
fallback
()
app/src/utils/data/grants.ts:230
↓ 2 callers
Function
fetchTrustBonusScore
(addresses: string[])
utils/src/trustBonus.ts:18
↓ 2 callers
Function
filterWhiteListed
(whiteList: Whitelist)
app/src/utils/data/grants.ts:227
↓ 2 callers
Function
getApprovedGrants
(grants: Grant[])
app/src/utils/data/grants.ts:219
↓ 2 callers
Function
getConvertedAmount
(amount: number, tokenAddress: string, direction = 1)
app/src/store/cart.ts:110
↓ 2 callers
Function
getGrantMatch
(grantId: number, grantsDistribution: GrantsDistribution)
dcurve/src/internal/utils.ts:45
↓ 2 callers
Function
getGrantRound
(blockNumber: number, grantRoundAddress: string, forceRefresh?: boolean)
app/src/utils/data/grantRounds.ts:131
↓ 2 callers
Method
getHexRoot
()
utils/src/merkle-distributor/merkle-tree.ts:68
↓ 2 callers
Function
getPredictionsForGrantInRound
(grantId: number, roundData: GrantRoundCLR)
app/src/utils/data/grantRounds.ts:492
↓ 2 callers
Function
grantListener
(name: string, refs: Record<string, Ref>)
app/src/utils/data/grants.ts:148
↓ 2 callers
Function
load
(key: string)
app/src/store/settings.ts:13
↓ 2 callers
Function
matchingTokenListener
( args: { grantRoundAddress: string; matchingTokenContract: Contract; grantIds: number[]; co
app/src/utils/data/grantRounds.ts:696
↓ 2 callers
Function
metadataUpdatedListener
( args: { grantRoundAddress: string; grantRoundContract: Contract; grantIds: number[]; contr
app/src/utils/data/grantRounds.ts:667
↓ 2 callers
Function
quoteExactInput
* @notice Returns the amountOutMin expected for a given trade assuming 0.5% slippage * @param path Swap path * @param amountIn Swap input amount, as
app/src/store/cart.ts:545
↓ 2 callers
Function
randomAddress
()
contracts/test/MerkleGrantRoundPayout.test.ts:17
↓ 2 callers
Method
recordContract
(name: string, address: string)
contracts/scripts/ScriptLogger.ts:55
↓ 2 callers
Function
resetState
()
app/src/store/wallet.ts:50
↓ 2 callers
Function
resolveMetaPtr
(url: string)
app/src/utils/data/ipfs.ts:68
↓ 2 callers
Method
save
()
contracts/scripts/ScriptLogger.ts:65
↓ 2 callers
Function
toHex
(val: BigNumberish)
app/src/store/cart.ts:70
↓ 2 callers
Function
useDataStore
()
app/src/store/data.ts:84
↓ 1 callers
Function
addAnonymousContribution
( grantId: number, grantRoundContributions: GrantRoundContributions, amount: number )
dcurve/src/internal/utils.ts:16
↓ 1 callers
Function
areMetaPtrsEqual
(x: MetaPtr, y: MetaPtr)
app/src/utils/data/grants.ts:170
↓ 1 callers
Function
assertSufficientBalance
(tokenAddress: string, requiredAmount: BigNumberish)
app/src/utils/utils.ts:198
↓ 1 callers
Method
bufArrToHexArr
(arr: Buffer[])
utils/src/merkle-distributor/merkle-tree.ts:114
↓ 1 callers
Method
bufDedup
(elements: Buffer[])
utils/src/merkle-distributor/merkle-tree.ts:108
↓ 1 callers
Method
calculate
( grantRoundContributions: GrantRoundContributions, _options?: Record<string, unknown> )
dcurve/src/internal/clr.ts:27
↓ 1 callers
Function
callMulticallContract
( calls: { target: string; contract: Contract; fns: (string | { fn: string; args: (string | BigNumberish)[]
app/src/utils/utils.ts:348
↓ 1 callers
Function
clear
(key: string)
app/src/store/settings.ts:15
↓ 1 callers
Function
clearCart
* @notice Removes all items from the cart
app/src/store/cart.ts:211
↓ 1 callers
Function
clearLastWallet
()
app/src/store/settings.ts:31
↓ 1 callers
Function
createTestnetConfig
(network: keyof typeof chainIds)
contracts/hardhat.config.ts:60
↓ 1 callers
Function
decodeMulticallReturnData
( returnData: { success: boolean; returnData: string }[], calls: { contract: Contract; fns: (string | { fn
app/src/utils/utils.ts:320
↓ 1 callers
Function
disconnectWallet
* @notice Disconnect the current user wallet
app/src/store/wallet.ts:115
↓ 1 callers
Function
filterContributionsByGrantId
(grantId: number, contributions: Contribution[])
app/src/utils/data/contributions.ts:240
↓ 1 callers
Function
filterContributionsByGrantRound
(round: GrantRound, contributions: Contribution[])
app/src/utils/data/contributions.ts:254
↓ 1 callers
Function
filterContributionsByUserAddress
* @notice given a userAddress and the contributions, return only the contributions for that address * @param userAddress * @param contributions
app/src/utils/data/contributions.ts:384
↓ 1 callers
Function
filterGrantRoundsForContributions
* @notice filters through the grantrounds and returns the necessary attributes for contribution detail screens * @param grantRounds * @param grantId
app/src/utils/data/contributions.ts:399
↓ 1 callers
Function
fixDonationRoundingErrors
* @notice Takes an array of donation data, and adjusts the ratios so they sum to 1e18 for each set of tokens * @dev For each token, we adjust the fir
app/src/store/cart.ts:524
↓ 1 callers
Function
fixtureGrants
(deployer: SignerWithAddress)
contracts/scripts/app.ts:16
↓ 1 callers
Function
fixtureManager
(deployer: SignerWithAddress, registry: Contract)
contracts/scripts/app.ts:48
↓ 1 callers
Function
fixtureRound
(registry: Contract, manager: Contract)
contracts/scripts/app.ts:59
↓ 1 callers
Function
fixtureRoundDonate
(manager: Contract, roundAddress: string)
contracts/scripts/app.ts:94
↓ 1 callers
Function
formatAddress
(address: string)
app/src/utils/utils.ts:25
↓ 1 callers
Function
getAllGrantRounds
(latestBlockNumber: number, forceRefresh = false)
app/src/utils/data/grantRounds.ts:48
↓ 1 callers
Function
getAllGrants
(latestBlockNumber: number, forceRefresh = false)
app/src/utils/data/grants.ts:27
↓ 1 callers
Function
getBalanceOfSlotSolidity
(mappingSlot: string, address: string)
contracts/test/utils.ts:195
↓ 1 callers
Function
getCartDonationInputs
* @notice Takes an array of cart items and returns inputs needed for the GrantRoundManager.donate() method
app/src/store/cart.ts:283
↓ 1 callers
Function
getContributions
( blockNumber: number, grantPayees: Record<string, string>, donationToken: TokenInfo, forceRefresh?: b
app/src/utils/data/contributions.ts:40
next →
1–100 of 196, ranked by callers