Merge branch 'webide/generate-deploy-script' into 'dev'
webide / generate deploy script updates See merge request ligolang/ligo!653
This commit is contained in:
commit
dc17676447
@ -16,6 +16,7 @@
|
||||
entrypoint: add
|
||||
parameters: 5, 6
|
||||
generateDeployScript:
|
||||
tool: tezos-client
|
||||
entrypoint: main
|
||||
storage: 0
|
||||
*_*)
|
||||
|
@ -62,6 +62,22 @@
|
||||
name_price=0tez;
|
||||
skip_price=333mutez
|
||||
}
|
||||
generateDeployScript:
|
||||
tool: tezos-client
|
||||
entrypoint: main
|
||||
storage: |
|
||||
{
|
||||
identities=Big_map.literal[
|
||||
(1,
|
||||
{owner=("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" : address);
|
||||
controller=("tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN" : address);
|
||||
profile=0x0501000000026869}
|
||||
);
|
||||
];
|
||||
next_id=2;
|
||||
name_price=10tez;
|
||||
skip_price=333mutez
|
||||
}
|
||||
*_*)
|
||||
|
||||
type id = int
|
||||
|
@ -16,6 +16,7 @@
|
||||
entrypoint: add
|
||||
parameters: (5, 6)
|
||||
generateDeployScript:
|
||||
tool: tezos-client
|
||||
entrypoint: main
|
||||
storage: 0
|
||||
*_*)
|
||||
|
@ -34,7 +34,7 @@
|
||||
controller=("tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN" : address);
|
||||
profile=0x0501000000026869]
|
||||
];
|
||||
next_id=2;
|
||||
next_id=2;
|
||||
name_price=0tez;
|
||||
skip_price=50mutez;
|
||||
]
|
||||
@ -60,6 +60,21 @@
|
||||
skip_price=333mutez;
|
||||
]
|
||||
)
|
||||
generateDeployScript:
|
||||
tool: tezos-client
|
||||
entrypoint: main
|
||||
storage: |
|
||||
record [
|
||||
identities=big_map[
|
||||
1->record
|
||||
[owner=("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" : address);
|
||||
controller=("tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN" : address);
|
||||
profile=0x0501000000026869]
|
||||
];
|
||||
next_id=2;
|
||||
name_price=0tez;
|
||||
skip_price=50mutez;
|
||||
]
|
||||
*_*)
|
||||
|
||||
type id is int
|
||||
|
@ -16,6 +16,7 @@
|
||||
entrypoint: add
|
||||
parameters: (5, 6)
|
||||
generateDeployScript:
|
||||
tool: tezos-client
|
||||
entrypoint: main
|
||||
storage: 0
|
||||
*_*)
|
||||
|
@ -60,6 +60,20 @@
|
||||
skip_price:333mutez
|
||||
}
|
||||
)
|
||||
generateDeployScript:
|
||||
tool: tezos-client
|
||||
entrypoint: main
|
||||
storage: |
|
||||
{
|
||||
identities:Big_map.literal([
|
||||
(1,
|
||||
{owner:("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" : address), controller:("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address), profile:0x0501000000026869}
|
||||
)
|
||||
]),
|
||||
next_id:2,
|
||||
name_price:10tez,
|
||||
skip_price:333mutez
|
||||
}
|
||||
*_*) */
|
||||
|
||||
type id = int
|
||||
|
@ -4,13 +4,12 @@ import styled from 'styled-components';
|
||||
|
||||
import { AppState } from '../../redux/app';
|
||||
import {
|
||||
ChangeCommandAction,
|
||||
ChangeEntrypointAction,
|
||||
ChangeStorageAction,
|
||||
ChangeToolAction,
|
||||
GenerateDeployScriptState,
|
||||
} from '../../redux/generate-deploy-script';
|
||||
import { Tool, ToolCommand } from '../../redux/types';
|
||||
import { Tool } from '../../redux/types';
|
||||
import { AccessFunctionLabel, Group, Input, Label, Textarea } from '../form/inputs';
|
||||
import { Option, Select } from '../form/select';
|
||||
|
||||
@ -25,10 +24,6 @@ export const GenerateDeployScriptPane = () => {
|
||||
state => state.generateDeployScript.tool
|
||||
);
|
||||
|
||||
const command = useSelector<AppState, GenerateDeployScriptState['command']>(
|
||||
state => state.generateDeployScript.command
|
||||
);
|
||||
|
||||
const entrypoint = useSelector<AppState, GenerateDeployScriptState['entrypoint']>(
|
||||
state => state.generateDeployScript.entrypoint
|
||||
);
|
||||
@ -49,16 +44,6 @@ export const GenerateDeployScriptPane = () => {
|
||||
<Option value={Tool.TezosClient}>Tezos Client</Option>
|
||||
</Select>
|
||||
</Group>
|
||||
<Group>
|
||||
<Label>Command</Label>
|
||||
<Select
|
||||
id="tool-command"
|
||||
value={command}
|
||||
onChange={value => dispatch({ ...new ChangeCommandAction(value) })}
|
||||
>
|
||||
<Option value={ToolCommand.Originate}>Originate</Option>
|
||||
</Select>
|
||||
</Group>
|
||||
<Group>
|
||||
<AccessFunctionLabel htmlFor="entrypoint"></AccessFunctionLabel>
|
||||
<Input
|
||||
|
@ -82,7 +82,7 @@ export class GenerateDeployScriptAction extends CancellableAction {
|
||||
|
||||
const title = slugify(editor.title).toLowerCase() || 'untitled';
|
||||
const output = `tezos-client \\
|
||||
${generateDeployScript.command} \\
|
||||
originate \\
|
||||
contract \\
|
||||
${title} \\
|
||||
transferring 0 \\
|
||||
|
@ -1,16 +1,14 @@
|
||||
import { ActionType as ExamplesActionType, ChangeSelectedAction as ChangeSelectedExampleAction } from './examples';
|
||||
import { Tool, ToolCommand } from './types';
|
||||
import { Tool } from './types';
|
||||
|
||||
export enum ActionType {
|
||||
ChangeTool = 'generate-deploy-script-change-tool',
|
||||
ChangeCommand = 'generate-deploy-script-change-command',
|
||||
ChangeEntrypoint = 'generate-deploy-script-change-entrypoint',
|
||||
ChangeStorage = 'generate-deploy-script-change-storage'
|
||||
}
|
||||
|
||||
export interface GenerateDeployScriptState {
|
||||
tool: Tool;
|
||||
command: ToolCommand;
|
||||
entrypoint: string;
|
||||
originationAccount: string;
|
||||
storage: string;
|
||||
@ -22,11 +20,6 @@ export class ChangeToolAction {
|
||||
constructor(public payload: GenerateDeployScriptState['tool']) {}
|
||||
}
|
||||
|
||||
export class ChangeCommandAction {
|
||||
public readonly type = ActionType.ChangeCommand;
|
||||
constructor(public payload: GenerateDeployScriptState['command']) {}
|
||||
}
|
||||
|
||||
export class ChangeEntrypointAction {
|
||||
public readonly type = ActionType.ChangeEntrypoint;
|
||||
constructor(public payload: GenerateDeployScriptState['entrypoint']) {}
|
||||
@ -39,14 +32,12 @@ export class ChangeStorageAction {
|
||||
|
||||
type Action =
|
||||
| ChangeToolAction
|
||||
| ChangeCommandAction
|
||||
| ChangeEntrypointAction
|
||||
| ChangeStorageAction
|
||||
| ChangeSelectedExampleAction;
|
||||
|
||||
const DEFAULT_STATE: GenerateDeployScriptState = {
|
||||
tool: Tool.TezosClient,
|
||||
command: ToolCommand.Originate,
|
||||
entrypoint: '',
|
||||
storage: '',
|
||||
originationAccount: '',
|
||||
@ -68,11 +59,6 @@ export default (
|
||||
...state,
|
||||
tool: action.payload
|
||||
};
|
||||
case ActionType.ChangeCommand:
|
||||
return {
|
||||
...state,
|
||||
command: action.payload
|
||||
};
|
||||
case ActionType.ChangeEntrypoint:
|
||||
return {
|
||||
...state,
|
||||
|
@ -16,7 +16,3 @@ export enum Command {
|
||||
export enum Tool {
|
||||
TezosClient = 'tezos-client'
|
||||
}
|
||||
|
||||
export enum ToolCommand {
|
||||
Originate = 'originate'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user