Skip to content

Commit

Permalink
Change devnet and env var (to master branch) (#261)
Browse files Browse the repository at this point in the history
* Change devnet-beta.2 to devnet.beta
* Change YAGNA_NETWORK to YAGNA_PAYMENT_NETWORK
  • Loading branch information
filipgolem authored Sep 23, 2021
1 parent 0d97192 commit f370bb6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/blender/blender.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async function main(subnetTag, driver, network) {
}

program
.option("--subnet-tag <subnet>", "set subnet name", "devnet-beta.2")
.option("--subnet-tag <subnet>", "set subnet name", "devnet-beta")
.option("--driver <driver>", "payment driver name, for example 'zksync'", "zksync")
.option("--network <network>", "network name, for example 'rinkeby'", "rinkeby")
.option("-d, --debug", "output extra debugging");
Expand Down
2 changes: 1 addition & 1 deletion examples/blender/blender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async function main(subnetTag: string, driver?: string, network?: string) {
}

program
.option("--subnet-tag <subnet>", "set subnet name, for example 'devnet-beta.2'")
.option("--subnet-tag <subnet>", "set subnet name, for example 'devnet-beta'")
.option("--driver <driver>", "payment driver name, for example 'zksync'")
.option("--network <network>", "network name, for example 'rinkeby'")
.option("-d, --debug", "output extra debugging");
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/hello.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function main() {
}

await asyncWith(
new Executor({ task_package: package, budget: "1.0", subnet_tag: "devnet-beta.2" }),
new Executor({ task_package: package, budget: "1.0", subnet_tag: "devnet-beta" }),
async (executor) => {
for await (let completed of executor.submit(worker, tasks)) {
console.log(completed.result().stdout);
Expand Down
2 changes: 1 addition & 1 deletion examples/low-level-api/listOffers.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const promiseTimeout = (seconds) =>
}, seconds * 1000)
);

program.option('--subnet-tag <subnet>', 'set subnet name', 'devnet-beta.2');
program.option('--subnet-tag <subnet>', 'set subnet name', 'devnet-beta');
program.parse(process.argv);
console.log(`Using subnet: ${program.subnetTag}`);

Expand Down
2 changes: 1 addition & 1 deletion examples/low-level-api/listOffers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const promiseTimeout = (seconds: number): Promise<void> =>
}, seconds * 1000)
);

program.option('--subnet-tag <subnet>', 'set subnet name', 'devnet-beta.2');
program.option('--subnet-tag <subnet>', 'set subnet name', 'devnet-beta');
program.parse(process.argv);
console.log(`Using subnet: ${program.subnetTag}`);

Expand Down
2 changes: 1 addition & 1 deletion examples/yacat/yacat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async function main(args) {
}

program
.option("--subnet-tag <subnet>", "set subnet name, for example 'devnet-beta.2'")
.option("--subnet-tag <subnet>", "set subnet name, for example 'devnet-beta'")
.option("--driver <driver>", "payment driver name, for example 'zksync'")
.option("--network <network>", "network name, for example 'rinkeby'")
.option("-d, --debug", "output extra debugging")
Expand Down
6 changes: 3 additions & 3 deletions yajsapi/executor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ const DEFAULT_EXECUTOR_TIMEOUT: number = dayjs
.duration({ minutes: 15 })
.asMilliseconds()

const DEFAULT_NETWORK: string = process.env["YAGNA_NETWORK"] || "rinkeby";
const DEFAULT_NETWORK: string = process.env["YAGNA_PAYMENT_NETWORK"] || "rinkeby";
const DEFAULT_DRIVER: string = process.env["YAGNA_PAYMENT_DRIVER"] || "zksync";
const DEFAULT_SUBNET: string = process.env["YAGNA_SUBNET"] || "devnet-beta.2";
const DEFAULT_SUBNET: string = process.env["YAGNA_SUBNET"] || "devnet-beta";

export class NoPaymentAccountError extends Error {
//"The error raised if no payment account for the required driver/network is available."
Expand Down Expand Up @@ -181,7 +181,7 @@ export class Executor {
* @param strategy market strategy used to select providers from the market (e.g. LeastExpensiveLinearPayuMS or DummyMS)
* @param subnet_tag use only providers in the subnet with the subnet_tag name (env variable equivalent: YAGNA_SUBNET)
* @param driver name of the payment driver to use or null to use the default driver; only payment platforms with the specified driver will be used (env variable equivalent: YAGNA_PAYMENT_DRIVER)
* @param network name of the network to use or null to use the default network; only payment platforms with the specified network will be used (env variable equivalent: YAGNA_NETWORK)
* @param network name of the network to use or null to use the default network; only payment platforms with the specified network will be used (env variable equivalent: YAGNA_PAYMENT_NETWORK)
* @param event_consumer a callable that processes events related to the computation; by default it is a function that logs all events
*/
constructor({
Expand Down

0 comments on commit f370bb6

Please sign in to comment.