Skip to content

Commit

Permalink
Merge branch 'master' into 1394-develop-smart-contracts-nativesingler…
Browse files Browse the repository at this point in the history
…equestproxy-erc20singlerequestproxy-singlerequestproxyfactory
  • Loading branch information
aimensahnoun committed Sep 18, 2024
2 parents ed429ae + 8d2d5d2 commit d9a4484
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"test": "lerna run test",
"format": "prettier . -w",
"format:check": "prettier . -c",
"link:all": "for d in packages/*; do pushd $d; yarn link; popd; done",
"unlink:all": "for d in packages/*; do pushd $d; yarn unlink; popd; done"
"link:all": "for d in packages/*; do cd $d; yarn link; cd -; done",
"unlink:all": "for d in packages/*; do cd $d; yarn unlink; cd -; done"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "4.18.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/payment-detection/src/thegraph/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const THE_GRAPH_URL_MANTLE_TESTNET =
'https://graph.testnet.mantle.xyz/subgraphs/name/requestnetwork/request-payments-mantle-testnet';

const THE_GRAPH_URL_MANTLE =
'https://graph.fusionx.finance/subgraphs/name/requestnetwork/request-payments-mantle';
'https://subgraph-api.mantle.xyz/api/public/555176e7-c1f4-49f9-9180-f2f03538b039/subgraphs/requestnetwork/request-payments-mantle/v0.1.0/gn';

const THE_GRAPH_URL_CORE =
'https://thegraph.coredao.org/subgraphs/name/requestnetwork/request-payments-core';
Expand Down
27 changes: 27 additions & 0 deletions packages/request-client.js/test/declarative-payments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,33 @@ describe('request-client.js: declarative payments', () => {
expect(requestData.balance!.balance).toEqual('10');
});

it('allows to create a request and declare a received payment in the same transaction', async () => {
const requestNetwork = new RequestNetwork({
useMockStorage: true,
signatureProvider: TestData.fakeSignatureProvider,
});
const request = await requestNetwork.createRequest({
...requestCreationParams,
requestInfo: {
...TestData.parametersWithoutExtensionsData,
extensionsData: [
{
action: ExtensionTypes.PnAnyDeclarative.ACTION.DECLARE_RECEIVED_PAYMENT,
id: ExtensionTypes.PAYMENT_NETWORK_ID.ANY_DECLARATIVE,
parameters: {
amount: '10',
note: 'received payment',
txhash: '0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
network: 'mainnet',
},
},
],
},
});
const requestData = await request.waitForConfirmation();
expect(requestData.balance!.balance).toEqual('10');
});

it('allows to declare a sent refund', async () => {
const requestNetwork = new RequestNetwork({
httpConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ export const chainlinkConversionPath = new ContractArtifact<ChainlinkConversionP
address: '0x0818Ad7016138f0A40DFAe30F64a923c2A8F61bA',
creationBlockNumber: 28548259,
},
// v0.1.0 contract - v0.2.0 required if/when we support EthConversionProxy on this chain
xdai: {
address: '0xEEc4790306C43DC00cebbE4D0c36Fadf8634B533',
creationBlockNumber: 18326897,
address: '0x05D782aD6D6556179A6387Ff1D2fA104FD5c515a',
creationBlockNumber: 35928984,
},
'arbitrum-one': {
address: '0x0818Ad7016138f0A40DFAe30F64a923c2A8F61bA',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ export const ethConversionArtifact = new ContractArtifact<EthConversionProxy>(
address: '0xEdfD8386d5DE52072B4Ad8dC69BBD0bB89f9A1fb',
creationBlockNumber: 10827267,
},
xdai: {
address: '0x3E3B04e1bF170522a5c5DDE628C4d365c0342239',
creationBlockNumber: 35929105,
},
},
},
'0.2.1': {
Expand All @@ -118,6 +122,10 @@ export const ethConversionArtifact = new ContractArtifact<EthConversionProxy>(
address: '0xEdfD8386d5DE52072B4Ad8dC69BBD0bB89f9A1fb',
creationBlockNumber: 10827267,
},
xdai: {
address: '0x3E3B04e1bF170522a5c5DDE628C4d365c0342239',
creationBlockNumber: 35929105,
},
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9999,9 +9999,9 @@ dotignore@~0.1.2:
minimatch "^3.0.4"

dset@^3.1.2:
version "3.1.3"
resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.3.tgz#c194147f159841148e8e34ca41f638556d9542d2"
integrity sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==
version "3.1.4"
resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.4.tgz#f8eaf5f023f068a036d08cd07dc9ffb7d0065248"
integrity sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==

duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2, duplexer2@~0.1.4:
version "0.1.4"
Expand Down

0 comments on commit d9a4484

Please sign in to comment.