Skip to content

Commit

Permalink
Change default driver to erc20next
Browse files Browse the repository at this point in the history
  • Loading branch information
kamirr committed Oct 23, 2023
1 parent 9a9dd80 commit 99dd885
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion examples/blender/blender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function main(subnetTag: string, driver?: string, network?: string, debug?

program
.option("--subnet-tag <subnet>", "set subnet name, for example 'public'")
.option("--payment-driver, --driver <driver>", "payment driver name, for example 'erc20'")
.option("--payment-driver, --driver <driver>", "payment driver name, for example 'erc20next'")
.option("--payment-network, --network <network>", "network name, for example 'goerli'")
.option("-d, --debug", "output extra debugging")
.option("-t, --max-parallel-tasks <maxParallelTasks>", "max parallel tasks");
Expand Down
2 changes: 1 addition & 1 deletion examples/fibonacci/fibonacci.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ program
.requiredOption("-n, --fibonacci-number <n>", "fibonacci number", (val) => parseInt(val))
.option("-c, --tasks-count <c>", "tasks count", (val) => parseInt(val))
.option("--subnet-tag <subnet>", "set subnet name, for example 'public'")
.option("--payment-driver, --driver <driver>", "payment driver name, for example 'erc20'")
.option("--payment-driver, --driver <driver>", "payment driver name, for example 'erc20next'")
.option("--payment-network, --network <network>", "network name, for example 'goerli'")
.option("-d, --debug", "output extra debugging");
program.parse();
Expand Down
2 changes: 1 addition & 1 deletion examples/ssh/ssh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function main(subnetTag, driver, network, count = 2, sessionTimeout = 100,

program
.option("--subnet-tag <subnet>", "set subnet name, for example 'public'")
.option("--payment-driver <paymentDriver>", "payment driver name, for example 'erc20'")
.option("--payment-driver <paymentDriver>", "payment driver name, for example 'erc20next'")
.option("--payment-network <paymentNetwork>", "network name, for example 'goerli'")
.option("--task-count, --count <count>", "task count", (val) => parseInt(val))
.option("-t, --timeout <timeout>", "ssh session timeout (in seconds)", (val) => parseInt(val))
Expand Down
2 changes: 1 addition & 1 deletion examples/yacat/yacat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function main(args) {

program
.option("--subnet-tag <subnet>", "set subnet name, for example 'public'")
.option("--payment-driver, --driver <driver>", "payment driver name, for example 'erc20'")
.option("--payment-driver, --driver <driver>", "payment driver name, for example 'erc20next'")
.option("--payment-network, --network <network>", "network name, for example 'goerli'")
.option("-d, --debug", "output extra debugging")
.option("--number-of-providers <number_of_providers>", "number of providers", (value) => parseInt(value), 2)
Expand Down
2 changes: 1 addition & 1 deletion src/executor/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Logger, LogLevel, runtimeContextChecker, defaultLogger } from "../utils
import { InMemoryJobStorage, JobStorage } from "../job/storage";

const DEFAULTS = Object.freeze({
payment: { driver: "erc20", network: "goerli" },
payment: { driver: "erc20next", network: "goerli" },
budget: 1.0,
subnetTag: "public",
logLevel: LogLevel.Info,
Expand Down
8 changes: 4 additions & 4 deletions src/market/proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export type PricingInfo = {
export type ProposalProperties = Record<string, string | number | string[] | number[] | boolean> & {
"golem.activity.caps.transfer.protocol": string[];
"golem.com.payment.debit-notes.accept-timeout?": number;
"golem.com.payment.platform.erc20-polygon-glm.address"?: string;
"golem.com.payment.platform.erc20-goerli-tglm.address"?: string;
"golem.com.payment.platform.erc20-mumbai-tglm.address"?: string;
"golem.com.payment.platform.erc20next-polygon-glm.address"?: string;
"golem.com.payment.platform.erc20next-goerli-tglm.address"?: string;
"golem.com.payment.platform.erc20next-mumbai-tglm.address"?: string;
/**
* @deprecated rinkeby is no longer supported, use other test networks instead
*/
"golem.com.payment.platform.erc20-rinkeby-tglm.address"?: string;
"golem.com.payment.platform.erc20next-rinkeby-tglm.address"?: string;
/**
* @deprecated rinkeby is no longer supported, use other test networks instead
*/
Expand Down
2 changes: 1 addition & 1 deletion src/package/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PackageOptions } from "./package";
* @internal
*/
export const DEFAULTS = Object.freeze({
payment: { driver: "erc20", network: "goerli" },
payment: { driver: "erc20next", network: "goerli" },
engine: "vm",
minMemGib: 0.5,
minStorageGib: 2,
Expand Down
2 changes: 1 addition & 1 deletion src/payment/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { InvoiceOptions } from "./invoice";
import { acceptAllDebitNotesFilter, acceptAllInvoicesFilter } from "./strategy";

const DEFAULTS = Object.freeze({
payment: { network: "goerli", driver: "erc20" },
payment: { network: "goerli", driver: "erc20next" },
budget: 1.0,
paymentTimeout: 1000 * 60, // 1 min
allocationExpires: 1000 * 60 * 60, // 60 min
Expand Down
6 changes: 3 additions & 3 deletions tests/mock/entities/allocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MarketDecoration } from "ya-ts-client/dist/ya-payment";
// @ts-ignore
export const allocationMock: Allocation = {
timeout: "",
paymentPlatform: "erc20-goerli-tglm",
paymentPlatform: "erc20next-goerli-tglm",
address: "",
id: "test_id",
timestamp: "",
Expand All @@ -14,11 +14,11 @@ export const allocationMock: Allocation = {
return Promise.resolve({
properties: [
{
key: "golem.com.payment.platform.erc20-goerli-tglm.address",
key: "golem.com.payment.platform.erc20next-goerli-tglm.address",
value: "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
},
],
constraints: ["(golem.com.payment.platform.erc20-goerli-tglm.address=*)"],
constraints: ["(golem.com.payment.platform.erc20next-goerli-tglm.address=*)"],
});
},
async release(): Promise<void> {
Expand Down
12 changes: 6 additions & 6 deletions tests/mock/fixtures/agreements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export const agreementsApproved = [
agreementId: "b9ef6f5feb7fa9e5eb226a5ca2b658823242451fa28b08df9e063943018cc883",
demand: {
properties: {
"golem.com.payment.chosen-platform": "erc20-rinkeby-tglm",
"golem.com.payment.platform.erc20-rinkeby-tglm.address": "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
"golem.com.payment.chosen-platform": "erc20next-rinkeby-tglm",
"golem.com.payment.platform.erc20next-rinkeby-tglm.address": "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
"golem.node.debug.subnet": "devnet-beta",
"golem.srv.caps.multi-activity": true,
"golem.srv.comp.expiration": 1669632825572,
Expand All @@ -13,17 +13,17 @@ export const agreementsApproved = [
"golem.srv.comp.vm.package_format": "gvmkit-squash",
},
constraints:
"(&(&(golem.inf.mem.gib>=0.5)\n\t(golem.inf.storage.gib>=2)\n\t(golem.runtime.name=vm))\n\t(golem.com.payment.platform.erc20-rinkeby-tglm.address=*)\n\t(golem.node.debug.subnet=devnet-beta))",
"(&(&(golem.inf.mem.gib>=0.5)\n\t(golem.inf.storage.gib>=2)\n\t(golem.runtime.name=vm))\n\t(golem.com.payment.platform.erc20next-rinkeby-tglm.address=*)\n\t(golem.node.debug.subnet=devnet-beta))",
demandId: "f8a7f2ac2e034123b59fdd45993ccb0e-7b25faa576ea7696a27775b6058470fedbfe9b4f86fc808de4a12ddffdef4811",
requestorId: "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
timestamp: "2022-11-28T10:38:57.369763Z",
},
offer: {
properties: {
"golem.activity.caps.transfer.protocol": ["gftp", "http", "https"],
"golem.com.payment.platform.erc20-goerli-tglm.address": "0x6e7f25ca8ab5a043d91d102116cc97c2654403f0",
"golem.com.payment.platform.erc20-mumbai-tglm.address": "0x6e7f25ca8ab5a043d91d102116cc97c2654403f0",
"golem.com.payment.platform.erc20-rinkeby-tglm.address": "0x6e7f25ca8ab5a043d91d102116cc97c2654403f0",
"golem.com.payment.platform.erc20next-goerli-tglm.address": "0x6e7f25ca8ab5a043d91d102116cc97c2654403f0",
"golem.com.payment.platform.erc20next-mumbai-tglm.address": "0x6e7f25ca8ab5a043d91d102116cc97c2654403f0",
"golem.com.payment.platform.erc20next-rinkeby-tglm.address": "0x6e7f25ca8ab5a043d91d102116cc97c2654403f0",
"golem.com.payment.platform.zksync-rinkeby-tglm.address": "0x6e7f25ca8ab5a043d91d102116cc97c2654403f0",
"golem.com.pricing.model": "linear",
"golem.com.pricing.model.linear.coeffs": [0.0001, 0.00005, 0],
Expand Down
2 changes: 1 addition & 1 deletion tests/mock/fixtures/allocations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const allocations = [
{
allocationId: "70000034-020b-40a0-8adc-404be7440beb",
address: "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
paymentPlatform: "erc20-goerli-tglm",
paymentPlatform: "erc20next-goerli-tglm",
totalAmount: "1",
spentAmount: "0",
remainingAmount: "1",
Expand Down
2 changes: 1 addition & 1 deletion tests/mock/fixtures/debit_notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const debitNotes = [
recipientId: "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
payeeAddr: "0xd9a4a6ba9e1800e4f61cd88dc23f082527f4ee28",
payerAddr: "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
paymentPlatform: "erc20-goerli-tglm",
paymentPlatform: "erc20next-goerli-tglm",
timestamp: "2022-12-05T08:54:31.831Z",
agreementId: "test_agreement_id",
activityId: "00f36a80a8544260acbf4b09dc46f4fc",
Expand Down
2 changes: 1 addition & 1 deletion tests/mock/fixtures/invoices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const invoices = [
recipientId: "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
payeeAddr: "0xd9a4a6ba9e1800e4f61cd88dc23f082527f4ee28",
payerAddr: "0x19ee20338a4c4bf8f6aebc79d9d3af2a01434119",
paymentPlatform: "erc20-goerli-tglm",
paymentPlatform: "erc20next-goerli-tglm",
timestamp: "2022-12-05T08:54:31.927Z",
agreementId: "test_agreement_id",
activityIds: ["00f36a80a8544260acbf4b09dc46f4fc"],
Expand Down
Loading

0 comments on commit 99dd885

Please sign in to comment.