Skip to content
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

Wrapper: add artifacts for aragonPM apps #273

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@izqui
Copy link
Member

izqui commented Apr 3, 2019

These artifacts have been generated with a new CLI command (aragon apm extract-functions) to extract function information from contracts that are not published as standalone Aragon apps: aragon/aragon-cli#423

@izqui izqui requested review from 2color and sohkai Apr 3, 2019

}
}

function getAPMAppInfo (appId) {

This comment has been minimized.

Copy link
@izqui

izqui Apr 3, 2019

Author Member

Decided to split it off in two functions so isAragonOsInternalApp is false for aragonPM apps. Alternatively we could add a boolean to the items in APP_MAPPING denoting whether the app is an internal app or not.

@sohkai

sohkai approved these changes Apr 4, 2019

Copy link
Member

sohkai left a comment

LGTM 👍. Generated artifacts look good!

Could we add some tests to https://github.com/aragon/aragon.js/blob/d078c4b16d/packages/aragon-wrapper/src/core/aragonOS/index.test.js?

}

return {
isAragonOsInternalApp: true,

This comment has been minimized.

Copy link
@sohkai

sohkai Apr 4, 2019

Member

Let's move this to be after the ...appInfo so it's ensured to be set.

return {
isAragonOsInternalApp: false,
...appInfo
}

This comment has been minimized.

Copy link
@sohkai

sohkai Apr 4, 2019

Member

I think we could simply return getAppInfo(appId, 'apm', APM_APP_MAPPINGS) ; isAragonOsInternalApp doesn't need to always be set.

@sohkai sohkai changed the title Add artifacts for aragonPM apps Wrapper: add artifacts for aragonPM apps Apr 4, 2019

function getKernelNamespace (hash) {
if (KERNEL_NAMESPACES.has(hash)) {
return { name: KERNEL_NAMESPACES.get(hash), hash }
}
}

export { getAragonOsInternalAppInfo, getKernelNamespace }
export { getAragonOsInternalAppInfo, getAPMAppInfo, getKernelNamespace }

This comment has been minimized.

Copy link
@0x6431346e

0x6431346e Apr 6, 2019

Member
Suggested change
export { getAragonOsInternalAppInfo, getAPMAppInfo, getKernelNamespace }
export { getAragonOsInternalAppInfo, getApmAppInfo, getKernelNamespace }

Might be worth considering to style APM as Apm in the context of a camel case name, similar to AragonOs

const APM_APP_MAPPINGS = new Map([
[aragonpmAppId('apm-registry'), 'APM Registry'],
[aragonpmAppId('apm-repo'), 'Repo'],
[aragonpmAppId('apm-enssub'), 'ENS Subdomain Registrar']

This comment has been minimized.

Copy link
@0x6431346e

0x6431346e Apr 6, 2019

Member
Suggested change
[aragonpmAppId('apm-enssub'), 'ENS Subdomain Registrar']
[aragonpmAppId('apm-enssub'), 'ENS Subdomain Registrar'],
[aragonpmAppId('apm-registry.open'), 'APM Registry'],
[aragonpmAppId('apm-repo.open'), 'Repo'],
[aragonpmAppId('apm-enssub.open'), 'ENS Subdomain Registrar']

See aragon/aragon-cli#425 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.