Skip to content

Commit

Permalink
[Relay] Implement a process that responds to KIOSK
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKim20 committed Nov 7, 2023
1 parent 07bbf3a commit 5c92bde
Show file tree
Hide file tree
Showing 14 changed files with 1,019 additions and 238 deletions.
1 change: 1 addition & 0 deletions packages/relay/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ relay:
- "${MANAGER_KEY5}"
accessKey: "${ACCESS_KEY}"
certifier: "${CERTIFIER_KEY}"
callbackEndpoint: "${CALLBACK_ENDPOINT}"

contracts:
tokenAddress : "${TOKEN_CONTRACT_ADDRESS}"
Expand Down
1 change: 1 addition & 0 deletions packages/relay/config/config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ relay:
- "${MANAGER_KEY5}"
accessKey: "${ACCESS_KEY}"
certifier: "${CERTIFIER_KEY}"
callbackEndpoint: "${CALLBACK_ENDPOINT}"

contracts:
tokenAddress : "${TOKEN_CONTRACT_ADDRESS}"
Expand Down
1 change: 1 addition & 0 deletions packages/relay/env/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ MANAGER_KEY5=0xc645ef34a5428f3b00f2d4b8cc647380f0b939d4ae5ccb7a04ead77ab0a8628d
CERTIFIER_KEY=0x8a840e693d52e57ca028621a8692c42d2d9c368c6fe4d0c1027408b87827e6ef

ACCESS_KEY=0x2c93e943c0d7f6f1a42f53e116c52c40fe5c1b428506dc04b290f2a77580a342
CALLBACK_ENDPOINT=http://127.0.0.1:3400/callback

TOKEN_CONTRACT_ADDRESS=0xFDa3d1ff3C570c2f76c2157Ef7A8640A75794eD9
LEDGER_CONTRACT_ADDRESS=0x12c316e0358d914A211A3d477db912A503cFCc21
Expand Down
5 changes: 5 additions & 0 deletions packages/relay/src/common/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export class RelayConfig implements IRelayConfig {
public managerKeys: string[];
public accessKey: string;
public certifierKey: string;
public callbackEndpoint: string;

/**
* Constructor
Expand All @@ -291,6 +292,7 @@ export class RelayConfig implements IRelayConfig {
this.managerKeys = defaults.managerKeys;
this.accessKey = defaults.accessKey;
this.certifierKey = defaults.certifierKey;
this.callbackEndpoint = defaults.callbackEndpoint;
}

/**
Expand All @@ -307,6 +309,7 @@ export class RelayConfig implements IRelayConfig {
],
accessKey: process.env.ACCESS_SECRET || "",
certifierKey: process.env.CERTIFIER_KEY || "",
callbackEndpoint: process.env.CALLBACK_ENDPOINT || "",
};
}

Expand All @@ -318,6 +321,7 @@ export class RelayConfig implements IRelayConfig {
if (config.managerKeys !== undefined) this.managerKeys = config.managerKeys;
if (config.accessKey !== undefined) this.accessKey = config.accessKey;
if (config.certifierKey !== undefined) this.certifierKey = config.certifierKey;
if (config.callbackEndpoint !== undefined) this.callbackEndpoint = config.callbackEndpoint;
}
}

Expand Down Expand Up @@ -501,6 +505,7 @@ export interface IRelayConfig {
managerKeys: string[];
accessKey: string;
certifierKey: string;
callbackEndpoint: string;
}

export interface IContractsConfig {
Expand Down
Loading

0 comments on commit 5c92bde

Please sign in to comment.