File tree Expand file tree Collapse file tree 2 files changed +4
-23
lines changed
deployment-dapp/src/singleFunction Expand file tree Collapse file tree 2 files changed +4
-23
lines changed Original file line number Diff line number Diff line change 11import { ENS , IExec } from 'iexec' ;
2- import { WEB3_TELEGRAM_ENS_DOMAIN } from '../config/config' ;
32
43export const configureEnsName = async (
54 iexec : IExec ,
65 appAddress : string ,
76 name : ENS
87) : Promise < void > => {
98 console . log ( `Configuring ENS ${ name } for app ${ appAddress } ` ) ;
10- const label = name . split ( `.${ WEB3_TELEGRAM_ENS_DOMAIN } ` ) [ 0 ] ;
11- const { registeredName, registerTxHash } = await iexec . ens . claimName (
12- label ,
13- WEB3_TELEGRAM_ENS_DOMAIN
14- ) ;
15- console . log ( `Claimed ${ registeredName } (tx: ${ registerTxHash } )` ) ;
169 const result = await iexec . ens . configureResolution ( name , appAddress ) ;
1710 console . log ( `Configured:\n${ JSON . stringify ( result , undefined , 2 ) } ` ) ;
1811} ;
Original file line number Diff line number Diff line change @@ -5,50 +5,38 @@ import {
55 DOCKER_IMAGE_NAMESPACE ,
66 DOCKER_IMAGE_REPOSITORY ,
77} from '../config/config.js' ;
8- import {
9- getDockerImageChecksum ,
10- loadSconeFingerprint ,
11- } from '../utils/utils.js' ;
128
139export const deployApp = async ( {
1410 iexec,
1511 dockerNamespace = DOCKER_IMAGE_NAMESPACE ,
1612 dockerRepository = DOCKER_IMAGE_REPOSITORY ,
1713 dockerTag,
1814 checksum,
15+ fingerprint,
1916} : {
2017 iexec : IExec ;
2118 dockerNamespace ?: string ;
2219 dockerRepository ?: string ;
2320 dockerTag : string ;
2421 checksum ?: string ;
22+ fingerprint ?: string ;
2523} ) : Promise < string > => {
2624 const name = APP_NAME ;
2725 const type = APP_TYPE ;
2826
29- // Use provided checksum or fetch from Docker Hub
30- const imageChecksum =
31- checksum ||
32- ( await getDockerImageChecksum (
33- dockerNamespace ,
34- dockerRepository ,
35- dockerTag
36- ) ) ;
37-
38- const fingerprint = await loadSconeFingerprint ( ) ;
3927 const mrenclave = {
4028 framework : 'SCONE' as any , // workaround framework not auto capitalized
4129 version : 'v5' ,
4230 entrypoint : 'node /app/app.js' ,
4331 heapSize : 1073741824 ,
44- fingerprint : fingerprint ,
32+ fingerprint,
4533 } ;
4634 const app = {
4735 owner : await iexec . wallet . getAddress ( ) ,
4836 name,
4937 type,
5038 multiaddr : `${ dockerNamespace } /${ dockerRepository } :${ dockerTag } ` ,
51- checksum : imageChecksum ,
39+ checksum,
5240 mrenclave,
5341 } ;
5442 console . log ( `Deploying app:\n${ JSON . stringify ( app , undefined , 2 ) } ` ) ;
You can’t perform that action at this time.
0 commit comments