Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Project-DARC/DARC
/ functions
Functions
407 in github.com/Project-DARC/DARC
⨍
Functions
407
◇
Types & classes
25
↓ 227 callers
Function
expression
(expressionId:number, nodeParam?:NodeParamStruct | undefined)
darc-js/src/SDK/Node.ts:324
↓ 58 callers
Method
entrance
* Run the program on the DARC contract. * @param program: the program to be run.
darc-js/src/DARC/DARC.ts:62
↓ 58 callers
Method
getTokenOwners
* Below are all DARC's dashboard functions, read parameters from the DARC contract.
darc-js/src/DARC/DARC.ts:72
↓ 37 callers
Method
getTokenOwnerBalance
* Return the balance of the owner for the token class. * @param tokenClass the index of the token class. * @param owner the address of the owner. *
darc-js/src/DARC/DARC.ts:113
↓ 30 callers
Function
toBigIntArray
* For any given array of numbers, convert them to BigInts * @param inputArray The array of numbers to be converted * @returns The array of BigInts
darc-js/src/SDK/opcodes/utils.ts:8
↓ 29 callers
Function
isValidBigIntOrNumberArray
* This function checks if the input array is a valid array of bigints or numbers * @param inputArray The array to be checked * @returns True if the
darc-js/src/SDK/opcodes/utils.ts:26
↓ 22 callers
Function
containsAddr
(array: string[], addr:string)
darc-protocol/test/operationUnitTest/batch_transfer_tokens_from_to.ts:16
↓ 22 callers
Function
toBigIntArray
(array: number[])
darc-js/tests/expression-test/expression-test.ts:31
↓ 21 callers
Function
batch_mint_tokens
(addressArray: string[], tokenClassArray: bigint[] | number[], amountArray: bigint[] | number[])
darc-js/src/darcjs.ts:120
↓ 21 callers
Function
executeOperationList
( operationList: OperationStruct[], wallet: ethers.Wallet, targetDARCAddress: string, notes?: string,
darc-js/src/darcjs.ts:90
↓ 16 callers
Function
containsAddr
* Check if an address is in an array * @param array * @param addr * @returns if the address is in the array
darc-protocol/test/operationUnitTest/batch_mint_token_test.ts:23
↓ 16 callers
Function
toBigIntArray
(array: number[])
darc-js/tests/sdk-test/sdk-node-generation-test.ts:31
↓ 16 callers
Function
toBigIntArray
(array: number[])
darc-js/tests/sdk-test/sdk-test.ts:31
↓ 13 callers
Function
deployDARC
(version: DARC_VERSION, signer: ethers.Wallet)
darc-js/src/deployDARC/deployDARC.ts:16
↓ 12 callers
Function
containsAddr
(array: string[], addr:string)
darc-protocol/test/operationUnitTest/batch_transfer_tokens.ts:15
↓ 9 callers
Method
generateConditionNodeList
* Generate a list of condition node structs for any node * This is the root function for generating the condition node struct list * All conditi
darc-js/src/SDK/Node.ts:151
↓ 6 callers
Function
batch_create_token_classes
(nameArray: string[], tokenIndexArray: bigint[] | number[], votingWeightArray: bigint[] | number[], dividendWe
darc-js/src/darcjs.ts:125
↓ 6 callers
Method
getTokenInfo
(tokenClass: BigInt)
darc-js/src/DARC/DARC.ts:76
↓ 6 callers
Function
toBigIntArray
(array: number[])
darc-js/tests/runtime-test/transpileAndRun.ts:31
↓ 5 callers
Function
batch_add_and_enable_plugins
(pluginArray: PluginStruct[] | PluginStructWithNode[])
darc-js/src/darcjs.ts:194
↓ 5 callers
Method
getNumberOfTokenClasses
* Return the number of token classes. * @returns the number of token classes.
darc-js/src/DARC/DARC.ts:103
↓ 4 callers
Function
containsAddr
(array: string[], addr:string)
darc-protocol/test/operationUnitTest/batch_pay_to_mint_tokens_test.ts:16
↓ 4 callers
Function
containsAddr
(array: string[], addr:string)
darc-protocol/test/operationUnitTest/batch_burn_tokens_from_test.ts:8
↓ 4 callers
Function
containsAddr
(array: string[], addr:string)
darc-protocol/test/operationUnitTest/batch_burn_tokens_test.ts:8
↓ 4 callers
Method
getMemberInfo
(memberAddress:string)
darc-js/src/DARC/DARC.ts:133
↓ 4 callers
Function
letAddressVote
(operatorAddress:string,darcAddress:string)
darc-protocol/test/votingTest/multiItemVotingTest.ts:15
↓ 4 callers
Function
operator_address_equals
(operatorAddress: string)
darc-js/src/SDK/conditionNodes/Condition_Operator.ts:61
↓ 4 callers
Function
or
(... args:Node[])
darc-js/src/SDK/Node.ts:316
↓ 4 callers
Function
run
(code:string, wallet:ethers.Wallet, targetDARCAddress:string, darcVersion: DARC.DARC_VERSION = DARC.DARC_VERSI
darc-js/src/SDK/runtime.ts:15
↓ 3 callers
Function
OPCODE_ID_12_BATCH_ADD_PLUGINS
( pluginList: PluginStruct[] | PluginStructWithNode[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:751
↓ 3 callers
Function
isValidBigIntOrNumber
(input: any)
darc-js/src/SDK/opcodes/utils.ts:60
↓ 3 callers
Function
isValidStringArray
(inputArray: string[])
darc-js/src/SDK/opcodes/utils.ts:43
↓ 3 callers
Function
letAddressVote
(operatorAddress:string,darcAddress:string)
darc-protocol/test/votingTest/multiClassTokenVotingTest.ts:17
↓ 3 callers
Function
letAddressVote
(operatorAddress:string,darcAddress:string)
darc-protocol/test/votingTest/multiAddressVotingTest.ts:17
↓ 2 callers
Function
OPCODE_ID_10_BATCH_CHANGE_MEMBER_ROLES
( memberAddressArray: string[], memberRoleArray: bigint[] | number[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:681
↓ 2 callers
Function
OPCODE_ID_11_BATCH_CHANGE_MEMBER_NAMES
( memberAddressArray: string[], memberNameArray: string[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:717
↓ 2 callers
Function
OPCODE_ID_13_BATCH_ENABLE_PLUGINS
( pluginIndexArray: bigint[] | number[], isBeforeOperationArray: boolean[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:780
↓ 2 callers
Function
OPCODE_ID_14_BATCH_DISABLE_PLUGINS
( pluginIndexArray: bigint[] | number[], isBeforeOperationArray: boolean[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:814
↓ 2 callers
Function
OPCODE_ID_15_BATCH_ADD_AND_ENABLE_PLUGINS
( pluginList: PluginStruct[] | PluginStructWithNode[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:848
↓ 2 callers
Function
OPCODE_ID_16_BATCH_SET_PARAMETERS
( parameterNameArray: bigint[] | number[], parameterValueArray: bigint[] | number[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:877
↓ 2 callers
Function
OPCODE_ID_17_BATCH_ADD_WITHDRAWABLE_BALANCES
( addressArray: string[], amountArray: bigint[] | number[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:909
↓ 2 callers
Function
OPCODE_ID_18_BATCH_REDUCE_WITHDRAWABLE_BALANCES
( addressArray: string[], amountArray: bigint[] | number[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:945
↓ 2 callers
Function
OPCODE_ID_19_BATCH_ADD_VOTING_RULES
( votingRuleList: VotingRuleStruct[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:981
↓ 2 callers
Function
OPCODE_ID_1_BATCH_MINT_TOKENS
( addressArray: string[], tokenClassArray: bigint[] | number[], amountArray: bigint[] | number[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:332
↓ 2 callers
Function
OPCODE_ID_20_BATCH_PAY_TO_MINT_TOKENS
( addressArray: string[], tokenClassArray: bigint[] | number[], amountArray: bigint[] | number[], p
darc-js/src/SDK/opcodes/opcodeTable.ts:1008
↓ 2 callers
Function
OPCODE_ID_21_BATCH_PAY_TO_TRANSFER_TOKENS
( toAddressArray: string[], tokenClassArray: bigint[] | number[], amountArray: bigint[] | number[],
darc-js/src/SDK/opcodes/opcodeTable.ts:1059
↓ 2 callers
Function
OPCODE_ID_22_ADD_EMERGENCY
( addressArray: string[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:1110
↓ 2 callers
Function
OPCODE_ID_24_CALL_EMERGENCY
( emergencyIndexArray: bigint[] | number[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:1139
↓ 2 callers
Function
OPCODE_ID_25_CALL_CONTRACT_ABI
( contractAddress: string, abiHexStringOrUint8Array: string | Uint8Array, value: bigint )
darc-js/src/SDK/opcodes/opcodeTable.ts:1172
↓ 2 callers
Function
OPCODE_ID_26_PAY_CASH
( amount: bigint, paymentType: bigint, dividendable: bigint )
darc-js/src/SDK/opcodes/opcodeTable.ts:1206
↓ 2 callers
Function
OPCODE_ID_27_OFFER_DIVIDENDS
()
darc-js/src/SDK/opcodes/opcodeTable.ts:1241
↓ 2 callers
Function
OPCODE_ID_29_SET_APPROVAL_FOR_ALL_OPERATIONS
( targetAddress: string )
darc-js/src/SDK/opcodes/opcodeTable.ts:1261
↓ 2 callers
Function
OPCODE_ID_2_BATCH_CREATE_TOKEN_CLASSES
( nameArray: string[], tokenIndexArray: bigint[] | number[], votingWeightArray: bigint[] | number[],
darc-js/src/SDK/opcodes/opcodeTable.ts:369
↓ 2 callers
Function
OPCODE_ID_30_BATCH_BURN_TOKENS_AND_REFUND
( tokenClassArray: bigint[] | number[], amountArray: bigint[] | number[], priceArray: bigint[] | number
darc-js/src/SDK/opcodes/opcodeTable.ts:1290
↓ 2 callers
Function
OPCODE_ID_31_ADD_STORAGE_STRING
( text: string )
darc-js/src/SDK/opcodes/opcodeTable.ts:1329
↓ 2 callers
Function
OPCODE_ID_32_VOTE
( voteArray: boolean[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:1356
↓ 2 callers
Function
OPCODE_ID_33_EXECUTE_PENDING_PROGRAM
()
darc-js/src/SDK/opcodes/opcodeTable.ts:1383
↓ 2 callers
Function
OPCODE_ID_34_END_EMERGENCY
()
darc-js/src/SDK/opcodes/opcodeTable.ts:1403
↓ 2 callers
Function
OPCODE_ID_35_UPGRADE_TO_ADDRESS
( newContractAddress: string )
darc-js/src/SDK/opcodes/opcodeTable.ts:1423
↓ 2 callers
Function
OPCODE_ID_36_CONFIRM_UPGRAED_FROM_ADDRESS
( oldContractAddress: string )
darc-js/src/SDK/opcodes/opcodeTable.ts:1450
↓ 2 callers
Function
OPCODE_ID_37_UPGRADE_TO_THE_LATEST
()
darc-js/src/SDK/opcodes/opcodeTable.ts:1477
↓ 2 callers
Function
OPCODE_ID_3_BATCH_TRANSFER_TOKENS
( toAddressArray: string[], tokenClassArray: bigint[] | number[], amountArray: bigint[] | number[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:420
↓ 2 callers
Function
OPCODE_ID_4_BATCH_TRANSFER_TOKENS_FROM_TO
( fromAddressArray: string[], toAddressArray: string[], tokenClassArray: bigint[] | number[], amoun
darc-js/src/SDK/opcodes/opcodeTable.ts:461
↓ 2 callers
Function
OPCODE_ID_5_BATCH_BURN_TOKENS
( tokenClassArray: bigint[] | number[], amountArray: bigint[] | number[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:503
↓ 2 callers
Function
OPCODE_ID_6_BATCH_BURN_TOKENS_FROM
( fromAddressArray: string[], tokenClassArray: bigint[] | number[], amountArray: bigint[] | number[]
darc-js/src/SDK/opcodes/opcodeTable.ts:541
↓ 2 callers
Function
OPCODE_ID_7_BATCH_ADD_MEMBERSHIPS
( memberAddressArray: string[], memberRoleArray: bigint[] | number[], memberNameArray: string[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:582
↓ 2 callers
Function
OPCODE_ID_8_BATCH_SUSPEND_MEMBERSHIPS
( memberAddressArray: string[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:623
↓ 2 callers
Function
OPCODE_ID_9_BATCH_RESUME_MEMBERSHIPS
( memberAddressArray: string[] )
darc-js/src/SDK/opcodes/opcodeTable.ts:652
↓ 2 callers
Method
address
* Return the address of the DARC contract. * @returns the address of the DARC contract.
darc-js/src/DARC/DARC.ts:95
↓ 2 callers
Function
containsAddr
(array: string[], addr:string)
darc-protocol/test/operationUnitTest/batch_pay_to_transfer_tokens_test.ts:8
↓ 2 callers
Method
generateBooleanConditionNodeStruct
* Generate a condition node struct for BOOLEAN_TRUE or BOOLEAN_FALSE * @param id The id of the condition node * @returns The condition node stru
darc-js/src/SDK/Node.ts:54
↓ 2 callers
Method
generateExpressionConditionNodeStruct
* Just generate a condition node struct for the expression node * @param id The id of the condition node * @returns The condition node struct
darc-js/src/SDK/Node.ts:34
↓ 2 callers
Function
letAddressVote
(operatorAddress:string,darcAddress:string)
darc-protocol/test/votingTest/multiItemVotingNegativeTest.ts:15
↓ 2 callers
Function
pluginProcessor
(pluginArray: PluginStruct[] | PluginStructWithNode[])
darc-js/src/SDK/opcodes/pluginProcessor.ts:9
↓ 2 callers
Method
processChildList
(childList: Node[])
darc-js/src/SDK/Node.ts:209
↓ 2 callers
Method
processChildList
(childList: Node[])
darc-js/src/SDK/Node.ts:246
↓ 2 callers
Function
sleep
(ms: number)
darc-protocol/test/conditionTest/operationLogTest.ts:80
↓ 2 callers
Function
transpile
(sourceCode: string)
darc-js/src/SDK/transpiler.ts:1
↓ 2 callers
Function
transpileAndRun
( code:string, wallet:ethers.Wallet, targetDARCAddress:string, darcVersion: DARC.DARC_VERSION = DAR
darc-js/src/SDK/runtime.ts:61
↓ 1 callers
Function
containsAddr
(array: string[], addr:string)
darc-protocol/test/withdrawTest/withdrawCashTest.ts:5
↓ 1 callers
Function
containsAddr
(array: string[], addr:string)
darc-protocol/test/withdrawTest/withdrawDividendTest.ts:13
↓ 1 callers
Function
darcBinary
(version: DARC_VERSION)
darc-js/src/darcBinary/darcBinary.ts:16
↓ 1 callers
Function
deployDARC
()
darc-protocol/scripts/deployDARC.ts:11
↓ 1 callers
Method
generate_AND_or_OR_or_NOT_ConditionNodeStructList
* Generate a list of condition node structs for the AND node * For example, if the AND node has 2 children, and the ID = 5, then the list will be:
darc-js/src/SDK/Node.ts:92
↓ 1 callers
Method
getMemberList
* Get the DARC member list. * @returns the DARC member list.
darc-js/src/DARC/DARC.ts:129
↓ 1 callers
Method
getPluginInfo
* Get the DARC plugins. * @returns the number of token classes.
darc-js/src/DARC/DARC.ts:121
↓ 1 callers
Function
handleCopy
()
darc-docs/src/pages/index.js:44
↓ 1 callers
Method
isValidExpressionNode
()
darc-js/src/SDK/plugins/ConditionNode.ts:241
↓ 1 callers
Method
isValidLogicalOperatorNode
()
darc-js/src/SDK/plugins/ConditionNode.ts:215
↓ 1 callers
Function
main
()
darc-protocol/scripts/getABI.ts:8
↓ 1 callers
Method
processAndNode
(node: Node)
darc-js/src/SDK/Node.ts:222
↓ 1 callers
Method
processOrNode
(node: Node)
darc-js/src/SDK/Node.ts:259
Method
[Symbol.for('!')]
()
darc-js/src/SDK/plugins/ConditionNode.ts:207
Method
[Symbol.for('&')]
* Operator overloading for AND node * @param other The other node * @returns The AND node
darc-js/src/SDK/Node.ts:179
Method
[Symbol.for('&')]
(rightOperand: ConditionNode)
darc-js/src/SDK/plugins/ConditionNode.ts:52
Method
[Symbol.for('|')]
* The operator overloading for OR node * @param other The other node * @returns The OR node
darc-js/src/SDK/Node.ts:191
Method
[Symbol.for('|')]
(rightOperand: ConditionNode)
darc-js/src/SDK/plugins/ConditionNode.ts:129
Function
add_any_voting_rule_approval_percentage_in_range
(startPercentage: number, endPercentage: number)
darc-js/src/SDK/conditionNodes/Condition_PluginAndVoting.ts:340
Function
add_any_voting_rule_is_absolute_majority
()
darc-js/src/SDK/conditionNodes/Condition_PluginAndVoting.ts:331
Function
add_any_voting_rule_token_class_contains
(tokenClass: number)
darc-js/src/SDK/conditionNodes/Condition_PluginAndVoting.ts:349
next →
1–100 of 407, ranked by callers