Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lidangzzz committed Dec 15, 2023
1 parent e97a4a7 commit c44073e
Show file tree
Hide file tree
Showing 28 changed files with 168 additions and 13 deletions.
25 changes: 25 additions & 0 deletions darc-js/dist/SDK/instructions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { TokenOperations } from "./struct/token-operation-map";
import { Plugin } from "./struct/Plugin";
declare function transfer_tokens(targetAddress: string, amount: number, tokenID: number): void;
declare function mint_tokens(tokenID: number, amount: number, targetAddress: string): void;
declare function create_token_class(tokenName: string, tokenVotingWeight: number, tokenDividendWeight: number): void;
declare function withdraw_dividends(): void;
declare function withdraw_money(amount: number): void;
declare function withdraw_money_and_send_to_address(amount: number, targetAddress: string): void;
declare function pay_money(amount: number): void;
declare function enable_plugin_index(pluginIndex: number): void;
declare function disable_plugin_index(pluginIndex: number): void;
declare function add_plugin(currentRestrictionPlugin: Plugin): void;
declare function add_and_enable_plugin(currentRestrictionPlugin: Plugin): void;
declare function burn_tokens(tokenID: number, amount: number, targetAddress: string): void;
declare function batch_transfer_tokens(tokenOperations: TokenOperations): void;
declare function batch_mint_tokens(tokenOperations: TokenOperations): void;
declare function batch_burn_tokens(tokenOperations: TokenOperations): void;
declare function call_emergency(emergency_id: number): void;
declare function set_parameter(parameter: string, value: string): void;
declare function add_to_member_list(alias: string, role: string, address: string): void;
declare function modify_member_list(alias: string, role: string, address: string): void;
declare function suspend_member_list(address: string): void;
declare function reactivate_member_list(address: string): void;
export { transfer_tokens, mint_tokens, create_token_class, withdraw_dividends, withdraw_money, withdraw_money_and_send_to_address, pay_money, enable_plugin_index, disable_plugin_index, add_plugin, add_and_enable_plugin, burn_tokens, batch_transfer_tokens, batch_mint_tokens, batch_burn_tokens, call_emergency, set_parameter, add_to_member_list, modify_member_list, suspend_member_list, reactivate_member_list };
//# sourceMappingURL=instructions.d.ts.map
1 change: 1 addition & 0 deletions darc-js/dist/SDK/instructions.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions darc-js/dist/SDK/instructions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions darc-js/dist/SDK/instructions.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions darc-js/dist/SDK/runtime.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare function run(code: string): void;
//# sourceMappingURL=runtime.d.ts.map
1 change: 1 addition & 0 deletions darc-js/dist/SDK/runtime.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions darc-js/dist/SDK/runtime.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions darc-js/dist/SDK/runtime.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions darc-js/dist/SDK/struct/Plugin.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ConditionNode } from "../plugin/ConditionNode";
import { VotingParameters } from "./voting-param";
declare class Plugin {
restrictionPluginDescription: string;
note: string;
conditionExpressionTreeRootNode: ConditionNode;
restrictionPluginReturnType: RestrictionPluginReturnType;
votingParameters: VotingParameters | null;
restrictionPluginType: RestrictionPluginType;
constructor(restrictionPluginDescription: string, conditionExpressionTreeRootNode: ConditionNode, restrictionPluginReturnType: RestrictionPluginReturnType, votingParameters: VotingParameters | null, restrictionPluginType: RestrictionPluginType);
constructor(note: string, conditionExpressionTreeRootNode: ConditionNode, restrictionPluginReturnType: RestrictionPluginReturnType, votingParameters: VotingParameters | null, restrictionPluginType: RestrictionPluginType);
}
declare enum RestrictionPluginReturnType {
NO = 0,
Expand Down
2 changes: 1 addition & 1 deletion darc-js/dist/SDK/struct/Plugin.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions darc-js/dist/SDK/struct/Plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion darc-js/dist/SDK/struct/Plugin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions darc-js/dist/SDK/struct/basicTypes.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type ADDRESS = string;
type UINT256 = bigint;
type ADDRESS_2D_ARRAY = string[][];
type UINT256_2D_ARRAY = bigint[][];
export { ADDRESS, UINT256, ADDRESS_2D_ARRAY, UINT256_2D_ARRAY };
//# sourceMappingURL=basicTypes.d.ts.map
1 change: 1 addition & 0 deletions darc-js/dist/SDK/struct/basicTypes.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions darc-js/dist/SDK/struct/basicTypes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions darc-js/dist/SDK/struct/basicTypes.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions darc-js/dist/SDK/transpiler.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare function transpiler(sourceCode: string): string;
//# sourceMappingURL=transpiler.d.ts.map
1 change: 1 addition & 0 deletions darc-js/dist/SDK/transpiler.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions darc-js/dist/SDK/transpiler.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions darc-js/dist/SDK/transpiler.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion darc-js/dist/darcjs.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { deployDARC } from './runtime/runtime';
import { transpiler } from './transpiler';
import { transpiler } from './SDK/transpiler';
import { DARC, InitParam, TokenInfo, MemberInfo } from './DARC/DARC';
import { darcBinary, DARCBinaryStruct, DARC_VERSION } from './darcBinary/darcBinary';
import { ethers } from 'ethers';
Expand Down
2 changes: 1 addition & 1 deletion darc-js/dist/darcjs.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion darc-js/dist/darcjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion darc-js/dist/darcjs.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// all the included instructions are here, mostly instructions for operations
// todo: add backend support for current operations

import { TokenOperations } from "./SDK/struct/token-operation-map";
import { Plugin } from "./SDK/struct/Plugin";
import { TokenOperations } from "./struct/token-operation-map";
import { Plugin } from "./struct/Plugin";

let operationList = [];

function transfer_tokens(targetAddress: string, amount: number, tokenID: number) {
}
Expand Down
8 changes: 8 additions & 0 deletions darc-js/src/SDK/runtime.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as instructions from "./instructions";

export function run(code:string) {
let include = '';
for (const key in instructions) {
include += `let ${key} = instructions.${key};\n`;
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion darc-js/src/darcjs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {deployDARC} from './runtime/runtime';
import { transpiler } from './transpiler';
import { transpiler } from './SDK/transpiler';
import { DARC, InitParam, TokenInfo, MemberInfo } from './DARC/DARC';
import { darcBinary, DARCBinaryStruct, DARC_VERSION } from './darcBinary/darcBinary';
import { ethers } from 'ethers';
Expand Down

0 comments on commit c44073e

Please sign in to comment.