Skip to content

Commit

Permalink
Merge branch 'plugin-dev-planning'
Browse files Browse the repository at this point in the history
  • Loading branch information
lidangzzz committed Dec 22, 2023
2 parents 3dc679c + 13cf352 commit af6a878
Show file tree
Hide file tree
Showing 43 changed files with 2,766 additions and 309 deletions.
4 changes: 2 additions & 2 deletions darc-docs/docs/DARC Protocol/OpCodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ By defining these operations through opcodes, the DARC protocol ensures consiste
| BATCH_PAY_TO_MINT_TOKENS | 20 | `addressArray`: address[]<br/>`tokenClassArray`: uint256[]<br/>`amountArray`: uint256[]<br/>`priceArray`: uint256[] | Batch Pay to Mint Tokens Operation |
| BATCH_PAY_TO_TRANSFER_TOKENS | 21 | `toAddressArray`: address[]<br/>`tokenClassArray`: uint256[]<br/>`amountArray`: uint256[]<br/>`priceArray`: uint256[] | Pay Some Cash to Transfer Tokens Operation |
| ADD_EMERGENCY | 22 | `addressArray`: address[] | Add an Array of Addresses as Emergency Agents |
| WITHDRAW_CASH_TO | 23 | `addressArray`: address[]<br/>`amountArray`: uint256[] | Withdraw Cash from the Contract's Cash Balance |
| RESERVED_ID_23 | 23 | `addressArray`: address[]<br/>`amountArray`: uint256[] | Withdraw Cash from the Contract's Cash Balance |
| CALL_EMERGENCY | 24 | `addressArray`: address[] | Call Emergency Agents to Handle Emergency Situations |
| CALL_CONTRACT_ABI | 25 | `contractAddress`: address<br/>`abi`: bytes | Call a Contract with the Given ABI |
| PAY_CASH | 26 | `amount`: uint256<br/>`paymentType`: uint256<br/>`dividendable`: uint256 | Pay Some Cash |
| OFFER_DIVIDENDS | 27 | N/A | Calculate Dividends and Offer to Token Holders |
| WITHDRAW_DIVIDENDS_TO | 28 | `addressArray`: address[]<br/>`amountArray`: uint256[] | Withdraw Dividends from the Withdrawable Dividends Balance |
| RESERVED_ID_28 | 28 | `addressArray`: address[]<br/>`amountArray`: uint256[] | Withdraw Dividends from the Withdrawable Dividends Balance |
| SET_APPROVAL_FOR_ALL_OPERATIONS | 29 | `address`: address | Set Approval for All Transfer Operations by Address |
| BATCH_BURN_TOKENS_AND_REFUND | 30 | `tokenClassArray`: uint256[] <br/> | Batch Burn Tokens and Refund |
| ADD_STORAGE_IPFS_HASH | 31 | `address`: string[] | Add Storage IPFS Hash |
Expand Down
3 changes: 3 additions & 0 deletions darc-js/src/SDK/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ export async function run(code:string, wallet:ethers.Wallet, targetDARCAddress:s
});

await attachedDARC.entrance(program);

// after execution, clear the operation list
instructions.operationList.length = 0;
}
45 changes: 43 additions & 2 deletions darc-js/src/darcBinary/DARC-test.json

Large diffs are not rendered by default.

Loading

0 comments on commit af6a878

Please sign in to comment.