Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Feat: Add descriptions utils for evm scripts and transactions#101

Merged
0xGabi merged 5 commits intomasterfrom
descriptions-utils
Jul 5, 2020
Merged

Feat: Add descriptions utils for evm scripts and transactions#101
0xGabi merged 5 commits intomasterfrom
descriptions-utils

Conversation

@0xGabi
Copy link
Copy Markdown
Contributor

@0xGabi 0xGabi commented Jul 3, 2020

This PR includes a utility to describe EVM scripts and transactions.

It exposes a few of the utils we use on connect-core to be accessible from connect.

It includes an example of how to use decodeScript to decode a script from a vote.

@0xGabi 0xGabi marked this pull request as ready for review July 3, 2020 22:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 3, 2020

Codecov Report

Merging #101 into master will decrease coverage by 1.88%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #101      +/-   ##
==========================================
- Coverage   28.12%   26.23%   -1.89%     
==========================================
  Files          54       56       +2     
  Lines         889      953      +64     
  Branches      145      150       +5     
==========================================
  Hits          250      250              
- Misses        639      703      +64     
Flag Coverage Δ
#unittests 26.23% <0.00%> (-1.89%) ⬇️
Impacted Files Coverage Δ
packages/connect-core/src/index.ts 0.00% <0.00%> (ø)
...connect-core/src/transactions/TransactionIntent.ts 0.00% <0.00%> (ø)
...onnect-core/src/transactions/TransactionRequest.ts 0.00% <ø> (ø)
packages/connect-core/src/utils/callScript.ts 0.00% <0.00%> (ø)
packages/connect-core/src/utils/descriptions.ts 0.00% <0.00%> (ø)
packages/connect-core/src/utils/forwarding.ts 0.00% <0.00%> (ø)
packages/connect-core/src/utils/index.ts 0.00% <0.00%> (ø)
...kages/connect-core/src/utils/path/calculatePath.ts 0.00% <0.00%> (ø)
packages/connect-core/src/utils/path/decodePath.ts 0.00% <0.00%> (ø)
packages/connect-core/src/utils/radspec/index.ts 0.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43280b1...bcf9344. Read the comment docs.

@@ -0,0 +1,40 @@
import { connect, describeScript, App } from '@aragon/connect'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Example of how to use describeScript to decode script from votes.

@@ -0,0 +1,4 @@
export { findAppMethodFromIntent } from './app'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I decided to expose this utilities, what you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good yes!

Copy link
Copy Markdown
Contributor

@bpierre bpierre left a comment

Choose a reason for hiding this comment

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

LGTM! Should we document these at some point?

Comment thread packages/connect-core/src/utils/descriptions.ts Outdated
@@ -0,0 +1,4 @@
export { findAppMethodFromIntent } from './app'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good yes!

Co-authored-by: Pierre Bertet <hello@pierre.world>
@0xGabi 0xGabi merged commit a2060a6 into master Jul 5, 2020
@0xGabi 0xGabi deleted the descriptions-utils branch July 5, 2020 17:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants