Skip to content

Formatted console.log output of example.js #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

chrisli30
Copy link
Member

No description provided.

@chrisli30 chrisli30 changed the base branch from main to new-task-data-structure November 14, 2024 01:14
Copy link
Member Author

@chrisli30 chrisli30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v9n I added a few design comments in this PR.

next: "transfer_erc20_1",
},
},
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch node representation is pending comparison and verfication from React Flow. I’ll get the details from frontend.

branch: {
  elseIfs: [],
  if: {
    expression: 'bigCmp(priceChainlink("0x694AA1769357215DE4FAC081bf1f309aDC325306"),toBigInt("10000") > 0',
    next: 'transfer_erc20_1'
  },
  else: null
},

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out retool as well, they do it quite different.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized that we could export the entire workflow as json, and here is the branch node’d data. The if else in conditions.

		{
			"top": -400,
			"left": 864,
			"uuid": "4951011d-0c38-4989-9816-65be605c6a45",
			"options": {
				"conditions": [
					{
						"id": "9dee7ff8-dbe1-4270-9232-94bc3837ffb0",
						"type": "if",
						"statement": "_.isEmpty(fetchDatabase.data)",
						"outgoingPortId": "1faa932e-93dc-4b3e-b553-153258c7f432"
					},
					{
						"id": "32109fbd-4c38-4b71-9a4e-9cc6d824f2d2",
						"type": "if",
						"statement": "",
						"outgoingPortId": "f89ed987-d56f-4ad3-96f1-0779d7cae63a"
					},
					{
						"id": "f09c21e1-c020-4a7a-b8a5-27e7210efacc",
						"type": "if",
						"statement": "",
						"outgoingPortId": "ebb1ed05-8689-4461-89f9-56ff6d3ecb06"
					},
					{
						"id": "640a6318-1173-44e6-bec4-3da179cd5930",
						"type": "else",
						"statement": "",
						"outgoingPortId": "ffc3deaf-76d8-4899-adc7-4918b1310ac6"
					}
				]
			},
			"pluginId": "branch1",
			"blockType": "conditional",
			"editorType": "JavascriptQuery",
			"onboarding": false,
			"environment": "production",
			"isMinimized": false,
			"resourceName": "JavascriptQuery",
			"incomingPorts": [],
			"outgoingPorts": [
				{
					"id": "1faa932e-93dc-4b3e-b553-153258c7f432",
					"name": "0",
					"type": "conditional"
				},
				{
					"id": "f89ed987-d56f-4ad3-96f1-0779d7cae63a",
					"name": "1",
					"type": "conditional"
				},
				{
					"id": "ebb1ed05-8689-4461-89f9-56ff6d3ecb06",
					"name": "2",
					"type": "conditional"
				},
				{
					"id": "ffc3deaf-76d8-4899-adc7-4918b1310ac6",
					"name": "3",
					"type": "conditional"
				}
			],
			"incomingOnSuccessEdges": [
				"c03ec8ae-0cac-4f4b-a2fe-13e21b7cad25"
			]
		}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"conditions": [
					{
						"id": "<ulid>",
						"type": "if",
						"expression": "<expr>",
					},
					{
						"id": "<ulid>",
						"type": "if",
						"expression": "<expr>",
					},
					{
						"id": "<ulid>",
						"type": "else",
						"expression": "<expr>",
					},
]
edges: [{
    id:
    source: <ulid_of_branch>.<ulid_of_if>
    target: 
}]

Copy link
Member

@v9n v9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

ready to merge.

@v9n v9n merged commit c365d66 into new-task-data-structure Nov 19, 2024
3 checks passed
@v9n v9n deleted the chris-update_example_logs branch November 19, 2024 17:50
@v9n
Copy link
Member

v9n commented Nov 19, 2024

Will address comment on the base branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants