Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SmarDex-Dev/smart-contracts
/ functions
Functions
277 in github.com/SmarDex-Dev/smart-contracts
⨍
Functions
277
◇
Types & classes
19
↓ 141 callers
Function
advanceBlockTo
(block: number)
test/helpers/time.ts:51
↓ 74 callers
Function
latestBlockNumber
()
test/helpers/time.ts:9
↓ 73 callers
Function
parseShare
(share: BigNumber)
test/Staking/utils.ts:9
↓ 41 callers
Function
isInRange
(result: BigNumber, compared: BigNumber, PCT: BigNumber, BASE: BigNumber)
test/SmardexLibrary/utils.ts:304
↓ 32 callers
Function
unitFixtureCampaignWith2rewards
( farming: Awaited<ReturnType<typeof unitFixtureFarmingRange>>, signer: Signer, initialBonusPerBlock: Bi
test/fixtures.ts:578
↓ 30 callers
Function
debug_log
(msg: string)
test/SmardexRouter/specs/BestTrade.spec.ts:16
↓ 24 callers
Function
getUserBalances
( signer: SignerWithAddress, token0: ERC20Test, token1: ERC20Test, WETHPartner: ERC20Test, WETH9: WE
test/SmardexRouter/specs/RouterScenarios.spec.ts:17
↓ 21 callers
Function
checkPairBalance
(pair: string)
test/SmardexRouter/specs/refundEth.spec.ts:13
↓ 18 callers
Function
getPermitSignature
( signer: SignerWithAddress, token: ERC20Permit | SmardexPair, spender: string, value: BigNumberish =
test/utils.ts:13
↓ 13 callers
Function
make_a_trade
( amount0: BigNumber, signer: SignerWithAddress, contracts: Contracts | { smardexRouter: SmardexRouter;
test/SmardexRouter/specs/BestTrade.spec.ts:20
↓ 13 callers
Function
unitFixtureCommon
(amount: BigNumber)
test/fixtures.ts:52
↓ 11 callers
Function
deployERC20Test
(total_supply: BigNumber)
test/deployers.ts:60
↓ 9 callers
Function
getSwapEncodedData
(payer: string, path: string)
test/utils.ts:9
↓ 9 callers
Function
show_reserves
(contracts: Contracts | { smardexPair: SmardexPair })
test/SmardexRouter/specs/BestTrade.spec.ts:56
↓ 8 callers
Function
addLiquidity
( token0Amount: BigNumber, token1Amount: BigNumber, token0: ERC20Test, token1: ERC20Test, router: Sm
test/SmardexRouter/utils.ts:54
↓ 8 callers
Function
deploySmardexFactory
()
test/deployers.ts:68
↓ 8 callers
Function
deploySmardexPair
( smardexFactory: SmardexFactory | SmardexFactoryV1, token0: ERC20Test | WETH9, token1: ERC20Test | WETH
test/deployers.ts:119
↓ 8 callers
Function
swapTest
( contracts: Contracts, signers: Signers, getAmountTestCase: GetAmountTrade, isExactTokenIn: b
test/SmardexPair/specs/swapWithValues.spec.ts:54
↓ 7 callers
Function
addLiquidity
( contracts: Contracts, admin: SignerWithAddress, token0Amount: BigNumber, token1Amount: BigNumber, )
test/SmardexPair/utils.ts:13
↓ 7 callers
Function
deploySmardexFactoryV1
()
test/deployers.ts:77
↓ 6 callers
Function
deploySmardexRouterTest
( smardexFactory: SmardexFactory | SmardexFactoryTest | SmardexFactoryV1 | SmardexFactoryTestV1, weth: WET
test/deployers.ts:173
↓ 6 callers
Function
getGasUsedAverage
( router: SmardexRouter, path: string[], exactInput: boolean, hre: HardhatRuntimeEnvironment, )
script/generateSwapGasCost.ts:92
↓ 6 callers
Function
randomAmount
(hre: HardhatRuntimeEnvironment)
script/generateSwapGasCost.ts:195
↓ 6 callers
Function
unitFixtureSmardexRouter
()
test/fixtures.ts:331
↓ 5 callers
Function
addCampaignAndCreateRewards
( farming: Awaited<ReturnType<typeof unitFixtureFarmingRange>>, user: string, admin: string, )
test/FarmingRange/utils.ts:581
↓ 5 callers
Function
createPair
( tokens: [string, string], smardexFactory: SmardexFactory | SmardexFactoryV1, bytecode: string, )
test/SmardexFactory/utils.ts:22
↓ 5 callers
Function
deploySmardexPairV1
( smardexFactory: SmardexFactory | SmardexFactoryV1, token0: ERC20Test | WETH9, token1: ERC20Test | WETH
test/deployers.ts:130
↓ 5 callers
Function
deploySmardexRouterV2WithV1Factory
( smardexFactory: SmardexFactory | SmardexFactoryV1, weth: WETH9, )
test/deployers.ts:206
↓ 5 callers
Function
deploySmardexToken
(name: string, symbol: string, supply: BigNumber)
test/deployers.ts:241
↓ 5 callers
Function
unitFixtureTokensAndPairWithFactory
(factory: SmardexFactory | SmardexFactoryV1)
test/fixtures.ts:490
↓ 4 callers
Function
addRewardsInfos
( nbRewardInfo: number, farming: FarmingRange | FarmingRangeL2Arbitrum, stakingToken: ERC20Test, rewar
test/FarmingRange/utils.ts:513
↓ 4 callers
Function
burnAndCheck
( contracts: Contracts, admin: SignerWithAddress, lpToBurn: BigNumber, expectedToken0: BigNumber, ex
test/SmardexPair/utils.ts:130
↓ 4 callers
Function
checkTotalRewards
(farming: FarmingRange)
test/FarmingRange/utils.ts:52
↓ 4 callers
Function
deployCallbackTestRouter
( smardexFactory: SmardexFactory | SmardexFactoryV1, WETH: WETH9, )
test/deployers.ts:362
↓ 4 callers
Function
deployOrderedPairOfERC20
(totalSupply: BigNumber)
test/deployers.ts:49
↓ 4 callers
Function
deploySmardexRouter
( smardexFactory: SmardexFactory | SmardexFactoryV1, weth: WETH9, )
test/deployers.ts:195
↓ 4 callers
Function
deployWETH9
()
test/deployers.ts:165
↓ 4 callers
Function
setupPair
(contracts: Contracts, signers: Signers)
test/SmardexPair/specs/swapFluid.spec.ts:10
↓ 4 callers
Function
shouldBehaveLikeSwap
()
test/SmardexPair/specs/swap.spec.ts:7
↓ 4 callers
Function
sqrt
(a: BigNumber)
test/utils.ts:123
↓ 3 callers
Function
deployAutoSwapperL1
( factoryAddress: string, sdexTokenAddress: string, stakingContractAddress: string, routerContractAddr
test/deployers.ts:281
↓ 3 callers
Function
deployDoubleSwapRouter
()
test/deployers.ts:342
↓ 3 callers
Function
deployPool
( token0: ERC20, amount0: BigNumber, token1: ERC20, amount1: BigNumber, smardexRouter: SmardexRouter
test/AutoSwapper/utils.ts:6
↓ 3 callers
Function
deploySmardexFactoryTest
()
test/deployers.ts:85
↓ 3 callers
Function
deployStaking
(smardexTokenAddress: string, farmingAddress: string)
test/deployers.ts:437
↓ 3 callers
Function
getCreate2Address
( factoryAddress: string, [tokenA, tokenB]: [string, string], bytecode: string, )
test/SmardexFactory/utils.ts:8
↓ 3 callers
Function
increase
(duration: BigNumber)
test/helpers/time.ts:22
↓ 3 callers
Function
isRewardInfoAfter
( farmingData: FarmingData, campaignIndex: number, rewardInfoIndex: number, blockNumberToBeExecuted: n
test/FarmingRange/utils.ts:464
↓ 3 callers
Function
isRewardInfoCrossing
( farmingData: FarmingData, campaignIndex: number, rewardInfoIndex: number, blockNumberToBeExecuted: n
test/FarmingRange/utils.ts:476
↓ 3 callers
Function
latest
()
test/helpers/time.ts:4
↓ 3 callers
Function
shouldBehaveLikeRewardManager
()
test/RewardManager/specs/rewardManager.spec.ts:19
↓ 3 callers
Function
swapBothTokens
( router: SmardexRouter, amountIn: BigNumber, token0: ERC20Test, token1: ERC20Test, adminAddress: st
test/AutoSwapper/specs/autoSwapper.spec.ts:34
↓ 3 callers
Function
unitFixtureRewardManagerData
()
test/fixtures.ts:689
↓ 2 callers
Function
addCampaignReward
( farmingData: FarmingData, endBlock: BigNumber[], rewardPerBlock: BigNumber[], campaignIndex: number,
test/FarmingRange/utils.ts:395
↓ 2 callers
Function
advanceBlock
()
test/helpers/time.ts:14
↓ 2 callers
Function
assertAlmostEqual
(expected: string, actual: string)
test/helpers/assert.ts:6
↓ 2 callers
Function
checkDataFarming
( farming: FarmingRange, campaignId: number[], rewardIndex: number[][], endBlock: number[][],
test/SmardexRouter/specs/testnetCheckFailedTest.ts:748
↓ 2 callers
Function
createPair
(tokens: [string, string], smardexFactory: SmardexFactory)
test/SmardexFactory/specs/SmardexFactory.spec.ts:20
↓ 2 callers
Function
deployArbSysCore
()
test/deployers.ts:257
↓ 2 callers
Function
deployCallbackTestRouterV2
( smardexFactory: SmardexFactory | SmardexFactoryV1, WETH: WETH9, )
test/deployers.ts:350
↓ 2 callers
Function
deployERC20Fluid
(total_supply: BigNumber)
test/deployers.ts:445
↓ 2 callers
Function
deployFarmingRange
(deployer: Signer)
test/deployers.ts:249
↓ 2 callers
Function
deployRouterEventEmitter
()
test/deployers.ts:233
↓ 2 callers
Function
deploySmardexPairTest
( smardexFactoryTest: SmardexFactoryTest | SmardexFactoryTestV1, token0: ERC20Test | WETH9, token1: ERC2
test/deployers.ts:141
↓ 2 callers
Function
deploySmardexRouterTestV2
( smardexFactory: SmardexFactory | SmardexFactoryTest | SmardexFactoryV1 | SmardexFactoryTestV1, weth: WET
test/deployers.ts:184
↓ 2 callers
Function
determinePairAddress
(token0: ERC20Test, token1: ERC20Test, factory: SmardexFactory)
test/fixtures.ts:241
↓ 2 callers
Function
farmingRangeTests
()
test/FarmingRange/FarmingRange.ts:73
↓ 2 callers
Function
generateNewRewardPerBlock
( farmingData: FarmingData, sdexToSplit: SdexByEndBlock[], campaignId: number, blockNumberToBeExecuted
test/FarmingRange/utils.ts:224
↓ 2 callers
Function
getAmountsParams
(side: number)
test/SmardexLibrary/utils.ts:280
↓ 2 callers
Function
getGasUsed
(router: SmardexRouter, path: string[], exactInput: boolean, hre: HardhatRuntimeEnvironment)
script/generateSwapGasCost.ts:103
↓ 2 callers
Function
getIndexByEndBlock
(data: SdexByEndBlock[], endBlockToFind: number)
test/FarmingRange/utils.ts:64
↓ 2 callers
Function
getProfitFromAddLiquidityAndSwap
( contracts: Contracts, admin: SignerWithAddress, user: SignerWithAddress, )
test/SmardexPair/specs/twoTokensInPairBeforeCreation.spec.ts:55
↓ 2 callers
Function
getTestTokenArgs
(token: Token)
deploy/utils.ts:181
↓ 2 callers
Function
getTetherTokenArgs
()
deploy/utils.ts:185
↓ 2 callers
Function
initializeFarmingCampaign
( startBlock: BigNumber, initialBonusPerBlock: BigNumber, nextPeriodRewardPerBlock: BigNumber, farming
test/fixtures.ts:638
↓ 2 callers
Function
mintAndCheck
( contracts: Contracts, admin: SignerWithAddress, token0Amount: BigNumber, token1Amount: BigNumber,
test/SmardexPair/utils.ts:36
↓ 2 callers
Function
sendEtherTo
(qty: BigNumber, adr: string, provider: any)
deploy/utils.ts:8
↓ 2 callers
Function
sendTokensToPair
(contracts: Contracts, token0Amount: BigNumber, token1Amount: BigNumber)
test/SmardexPair/utils.ts:8
↓ 2 callers
Function
setupFarmingRangeSigners
( fixtures: Awaited<ReturnType<typeof setupFarmingRangeTokens>>, farmingRange: FarmingRange, )
test/fixtures.ts:555
↓ 2 callers
Function
setupFarmingRangeTokens
()
test/fixtures.ts:501
↓ 2 callers
Function
setupTest
( admin: SignerWithAddress, alice: SignerWithAddress, permitAmount: BigNumber, farming
test/FarmingRange/specs/depositWithPermit.spec.ts:18
↓ 2 callers
Function
shouldBehaveLikeAutoSwapper
()
test/AutoSwapper/specs/autoSwapper.spec.ts:57
↓ 2 callers
Function
shouldBehaveLikeBurn
()
test/SmardexPair/specs/burn.spec.ts:7
↓ 2 callers
Function
shouldBehaveLikeComputeFictiveReserves
()
test/SmardexLibrary/specs/computeFictiveReserves.spec.ts:4
↓ 2 callers
Function
shouldBehaveLikeGetUpdatedPriceAverage
()
test/SmardexLibrary/specs/getUpdatedPriceAverage.spec.ts:6
↓ 2 callers
Function
shouldBehaveLikeInitialize
()
test/SmardexPair/specs/initialize.spec.ts:3
↓ 2 callers
Function
shouldBehaveLikeMint
()
test/SmardexPair/specs/mint.spec.ts:7
↓ 2 callers
Function
shouldBehaveLikeSmardexPairPriceAverage
()
test/SmardexPair/specs/pairPriceAverage.spec.ts:12
↓ 2 callers
Function
shouldBehaveLikeSwapWithValues
(v1: boolean)
test/SmardexPair/specs/swapWithValues.spec.ts:11
↓ 2 callers
Function
unitFixtureAutoSwapperData
()
test/fixtures.ts:653
↓ 1 callers
Function
addLiquidity
( token0Amount: BigNumber, token1Amount: BigNumber, token0: ERC20Test, token1: ERC20Test, router: Sm
test/AutoSwapper/specs/autoSwapper.spec.ts:9
↓ 1 callers
Function
argsWethArbitrumGoerli
()
deploy/utils.ts:19
↓ 1 callers
Function
baseContext
(description: string, hooks: () => void)
test/contexts.ts:9
↓ 1 callers
Function
checkFees
( contracts: Contracts, amountIn: BigNumber, getAmountTestCase: GetAmountTrade, isFeeToSet: bo
test/SmardexPair/specs/swapWithValues.spec.ts:179
↓ 1 callers
Function
checkResults
( contracts: Contracts, signers: Signers, getAmountTestCase: GetAmountTrade, isSwapToken0ToTok
test/SmardexPair/specs/swapWithValues.spec.ts:129
↓ 1 callers
Function
computeFarmingSdexValueOneCampaign
(farmingData: FarmingData, campaignId: number)
test/FarmingRange/utils.ts:349
↓ 1 callers
Function
computeFarmingSdexValueOneRewardInfo
( farmingData: FarmingData, campaignId: number, rewardIndex: number, )
test/FarmingRange/utils.ts:359
↓ 1 callers
Function
deployAutoSwapperL2
( factoryAddress: string, sdexTokenAddress: string, routerContractAddress: string, )
test/deployers.ts:299
↓ 1 callers
Function
deployCheckBlockTest
( stakingAddress: string, smardexTokenAddress: string, )
test/deployers.ts:426
↓ 1 callers
Function
deployFakeERC20reentrancy
( smardexFactory: SmardexFactory | SmardexFactoryV1, WETH: WETH9, )
test/deployers.ts:396
next →
1–100 of 277, ranked by callers