Skip to content

Commit 658828a

Browse files
committed
refactor: rename env variables
1 parent de76f22 commit 658828a

File tree

12 files changed

+30
-30
lines changed

12 files changed

+30
-30
lines changed

examples/acp_base/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Before running the examples, you need to set up your environment variables. Crea
1515
# Required for all examples
1616
WHITELISTED_WALLET_PRIVATE_KEY=0x... # Your whitelisted wallet private key
1717
WHITELISTED_WALLET_ENTITY_ID=... # Your session entity key ID
18-
BUYER_WALLET_ADDRESS=0x... # Buyer's wallet address
19-
SELLER_WALLET_ADDRESS=0x... # Seller's wallet address
18+
BUYER_AGENT_WALLET_ADDRESS=0x... # Buyer's wallet address
19+
SELLER_AGENT_WALLET_ADDRESS=0x... # Seller's wallet address
2020

2121
# Required for external evaluation examples
22-
EVALUATOR_WALLET_ADDRESS=0x... # Evaluator's wallet address
22+
EVALUATOR_AGENT_WALLET_ADDRESS=0x... # Evaluator's wallet address
2323
```
2424

2525
### Getting the Required Values
@@ -37,9 +37,9 @@ EVALUATOR_WALLET_ADDRESS=0x... # Evaluator's wallet address
3737
![Session Entity ID](docs/imgs/session-entity-id-location.png)
3838

3939
3. **Wallet Addresses**
40-
- `BUYER_WALLET_ADDRESS`: The wallet address of the agent initiating the job
41-
- `SELLER_WALLET_ADDRESS`: The wallet address of the agent providing the service
42-
- `EVALUATOR_WALLET_ADDRESS`: (For external evaluation) The wallet address of the third-party evaluator
40+
- `BUYER_AGENT_WALLET_ADDRESS`: The wallet address of the agent initiating the job
41+
- `SELLER_AGENT_WALLET_ADDRESS`: The wallet address of the agent providing the service
42+
- `EVALUATOR_AGENT_WALLET_ADDRESS`: (For external evaluation) The wallet address of the third-party evaluator
4343

4444
> **Note:** Make sure your wallet has sufficient $BMW tokens for testing on Base Sepolia. If you need tokens, please reach out to Virtuals' DevRel team.
4545
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
WHITELISTED_WALLET_PRIVATE_KEY=0x-<whitelisted-wallet-private-key>
22
WHITELISTED_WALLET_ENTITY_ID=<whitelisted-wallet-entity-id>
3-
BUYER_WALLET_ADDRESS=<buyer-agent-wallet-address>
4-
SELLER_WALLET_ADDRESS=<seller-agent-wallet-address>
5-
EVALUATOR_WALLET_ADDRESS=<evaluator-agent-wallet-address>
3+
BUYER_AGENT_WALLET_ADDRESS=<buyer-agent-wallet-address>
4+
SELLER_AGENT_WALLET_ADDRESS=<seller-agent-wallet-address>
5+
EVALUATOR_AGENT_WALLET_ADDRESS=<evaluator-agent-wallet-address>

examples/acp_base/external_evaluation/buyer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import AcpContractClient, { AcpJobPhases } from "../../../src/acpContractClient"
55
import AcpJob from "../../../src/acpJob";
66
import { baseSepoliaAcpConfig } from "../../../src";
77
import {
8-
BUYER_WALLET_ADDRESS,
9-
EVALUATOR_WALLET_ADDRESS,
8+
BUYER_AGENT_WALLET_ADDRESS,
9+
EVALUATOR_AGENT_WALLET_ADDRESS,
1010
WHITELISTED_WALLET_ENTITY_ID,
1111
WHITELISTED_WALLET_PRIVATE_KEY
1212
} from "./env";
@@ -16,7 +16,7 @@ async function buyer() {
1616
acpContractClient: await AcpContractClient.build(
1717
WHITELISTED_WALLET_PRIVATE_KEY,
1818
WHITELISTED_WALLET_ENTITY_ID,
19-
BUYER_WALLET_ADDRESS,
19+
BUYER_AGENT_WALLET_ADDRESS,
2020
baseSepoliaAcpConfig
2121
),
2222
onNewTask: async (job: AcpJob) => {
@@ -43,7 +43,7 @@ async function buyer() {
4343
const jobId = await chosenJobOffering.initiateJob(
4444
chosenJobOffering.requirementSchema || {},
4545
new Date(Date.now() + 1000 * 60 * 60 * 24),
46-
EVALUATOR_WALLET_ADDRESS,
46+
EVALUATOR_AGENT_WALLET_ADDRESS,
4747
);
4848

4949
console.log(`Job ${jobId} initiated`);

examples/acp_base/external_evaluation/env.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function getEnvVar<T extends string = string>(key: string, required = true): T {
1313

1414
export const WHITELISTED_WALLET_PRIVATE_KEY = getEnvVar<Address>('WHITELISTED_WALLET_PRIVATE_KEY');
1515
export const WHITELISTED_WALLET_ENTITY_ID = parseInt(getEnvVar('WHITELISTED_WALLET_ENTITY_ID'), 10);
16-
export const BUYER_WALLET_ADDRESS = getEnvVar<Address>('BUYER_WALLET_ADDRESS');
17-
export const SELLER_WALLET_ADDRESS = getEnvVar<Address>('SELLER_WALLET_ADDRESS');
18-
export const EVALUATOR_WALLET_ADDRESS = getEnvVar<Address>('EVALUATOR_WALLET_ADDRESS');
16+
export const BUYER_AGENT_WALLET_ADDRESS = getEnvVar<Address>('BUYER_AGENT_WALLET_ADDRESS');
17+
export const SELLER_AGENT_WALLET_ADDRESS = getEnvVar<Address>('SELLER_AGENT_WALLET_ADDRESS');
18+
export const EVALUATOR_AGENT_WALLET_ADDRESS = getEnvVar<Address>('EVALUATOR_AGENT_WALLET_ADDRESS');
1919

2020
if (isNaN(WHITELISTED_WALLET_ENTITY_ID)) {
2121
throw new Error('WHITELISTED_WALLET_ENTITY_ID must be a valid number in the .env file');

examples/acp_base/external_evaluation/evaluator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AcpContractClient from "../../../src/acpContractClient";
55
import AcpJob from "../../../src/acpJob";
66
import { baseSepoliaAcpConfig } from "../../../src";
77
import {
8-
EVALUATOR_WALLET_ADDRESS,
8+
EVALUATOR_AGENT_WALLET_ADDRESS,
99
WHITELISTED_WALLET_ENTITY_ID,
1010
WHITELISTED_WALLET_PRIVATE_KEY
1111
} from "./env";
@@ -15,7 +15,7 @@ async function evaluator() {
1515
acpContractClient: await AcpContractClient.build(
1616
WHITELISTED_WALLET_PRIVATE_KEY,
1717
WHITELISTED_WALLET_ENTITY_ID,
18-
EVALUATOR_WALLET_ADDRESS,
18+
EVALUATOR_AGENT_WALLET_ADDRESS,
1919
baseSepoliaAcpConfig
2020
),
2121
onEvaluate: async (job: AcpJob) => {

examples/acp_base/external_evaluation/seller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AcpContractClient, { AcpJobPhases } from "../../../src/acpContractClient"
55
import AcpJob from "../../../src/acpJob";
66
import { baseSepoliaAcpConfig } from "../../../src";
77
import {
8-
SELLER_WALLET_ADDRESS,
8+
SELLER_AGENT_WALLET_ADDRESS,
99
WHITELISTED_WALLET_ENTITY_ID,
1010
WHITELISTED_WALLET_PRIVATE_KEY
1111
} from "./env";
@@ -15,7 +15,7 @@ async function seller() {
1515
acpContractClient: await AcpContractClient.build(
1616
WHITELISTED_WALLET_PRIVATE_KEY,
1717
WHITELISTED_WALLET_ENTITY_ID,
18-
SELLER_WALLET_ADDRESS,
18+
SELLER_AGENT_WALLET_ADDRESS,
1919
baseSepoliaAcpConfig
2020
),
2121
onNewTask: async (job: AcpJob) => {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
WHITELISTED_WALLET_PRIVATE_KEY=0x-<whitelisted-wallet-private-key>
22
WHITELISTED_WALLET_ENTITY_ID=<whitelisted-wallet-entity-id>
3-
BUYER_WALLET_ADDRESS=<buyer-agent-wallet-address>
4-
SELLER_WALLET_ADDRESS=<seller-agent-wallet-address>
3+
BUYER_AGENT_WALLET_ADDRESS=<buyer-agent-wallet-address>
4+
SELLER_AGENT_WALLET_ADDRESS=<seller-agent-wallet-address>

examples/acp_base/self_evaluation/buyer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AcpContractClient, { AcpJobPhases } from "../../../src/acpContractClient"
55
import AcpJob from "../../../src/acpJob";
66
import { baseSepoliaAcpConfig } from "../../../src";
77
import {
8-
BUYER_WALLET_ADDRESS,
8+
BUYER_AGENT_WALLET_ADDRESS,
99
WHITELISTED_WALLET_ENTITY_ID,
1010
WHITELISTED_WALLET_PRIVATE_KEY
1111
} from "./env";
@@ -15,7 +15,7 @@ async function buyer() {
1515
acpContractClient: await AcpContractClient.build(
1616
WHITELISTED_WALLET_PRIVATE_KEY,
1717
WHITELISTED_WALLET_ENTITY_ID,
18-
BUYER_WALLET_ADDRESS,
18+
BUYER_AGENT_WALLET_ADDRESS,
1919
baseSepoliaAcpConfig
2020
),
2121
onNewTask: async (job: AcpJob) => {

examples/acp_base/self_evaluation/env.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ function getEnvVar<T extends string = string>(key: string, required = true): T {
1313

1414
export const WHITELISTED_WALLET_PRIVATE_KEY = getEnvVar<Address>('WHITELISTED_WALLET_PRIVATE_KEY');
1515
export const WHITELISTED_WALLET_ENTITY_ID = parseInt(getEnvVar('WHITELISTED_WALLET_ENTITY_ID'), 10);
16-
export const BUYER_WALLET_ADDRESS = getEnvVar<Address>('BUYER_WALLET_ADDRESS');
17-
export const SELLER_WALLET_ADDRESS = getEnvVar<Address>('SELLER_WALLET_ADDRESS');
16+
export const BUYER_AGENT_WALLET_ADDRESS = getEnvVar<Address>('BUYER_AGENT_WALLET_ADDRESS');
17+
export const SELLER_AGENT_WALLET_ADDRESS = getEnvVar<Address>('SELLER_AGENT_WALLET_ADDRESS');
1818

1919
if (isNaN(WHITELISTED_WALLET_ENTITY_ID)) {
2020
throw new Error('WHITELISTED_WALLET_ENTITY_ID must be a valid number in the .env file');

examples/acp_base/self_evaluation/seller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AcpContractClient, { AcpJobPhases } from "../../../src/acpContractClient"
55
import AcpJob from "../../../src/acpJob";
66
import { baseSepoliaAcpConfig } from "../../../src";
77
import {
8-
SELLER_WALLET_ADDRESS,
8+
SELLER_AGENT_WALLET_ADDRESS,
99
WHITELISTED_WALLET_ENTITY_ID,
1010
WHITELISTED_WALLET_PRIVATE_KEY
1111
} from "./env";
@@ -15,7 +15,7 @@ async function seller() {
1515
acpContractClient: await AcpContractClient.build(
1616
WHITELISTED_WALLET_PRIVATE_KEY,
1717
WHITELISTED_WALLET_ENTITY_ID,
18-
SELLER_WALLET_ADDRESS,
18+
SELLER_AGENT_WALLET_ADDRESS,
1919
baseSepoliaAcpConfig
2020
),
2121
onNewTask: async (job: AcpJob) => {

helpers/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
WHITELISTED_WALLET_PRIVATE_KEY=
22
WHITELISTED_WALLET_ENTITY_ID=
3-
BUYER_WALLET_ADDRESS=
3+
BUYER_AGENT_WALLET_ADDRESS=

helpers/acpHelperFunctions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async function testHelperFunctions() {
1616
acpContractClient: await AcpContractClient.build(
1717
process.env.WHITELISTED_WALLET_PRIVATE_KEY as `0x${string}`,
1818
Number(process.env.WHITELISTED_WALLET_ENTITY_ID),
19-
process.env.BUYER_WALLET_ADDRESS as Address,
19+
process.env.BUYER_AGENT_WALLET_ADDRESS as Address,
2020
baseSepoliaAcpConfig
2121
)
2222
});

0 commit comments

Comments
 (0)