Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b9c7485
Merge pull request #178 from Tonomy-Foundation/development
sadiabbasi Dec 11, 2025
678219c
chore(release): 1.5.0-rc.1 [skip ci]
semantic-release-bot Dec 11, 2025
7011e90
fix: :fire: fixed base burn address
sadiabbasi Dec 11, 2025
e4f1bfe
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 11, 2025
254bc59
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 11, 2025
d5b5436
Merge branch 'feature/update-swap-flow' of https://github.com/Tonomy-…
sadiabbasi Dec 11, 2025
604b794
Merge pull request #179 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 11, 2025
13f11fe
chore(release): 1.5.0-rc.2 [skip ci]
semantic-release-bot Dec 11, 2025
3d24932
Merge pull request #181 from Tonomy-Foundation/testnet
sadiabbasi Dec 16, 2025
e2006b9
chore(release): 1.5.0 [skip ci]
semantic-release-bot Dec 16, 2025
0da35e9
fix: :zap: fixed the set settings sdk
sadiabbasi Dec 16, 2025
711e6e7
Merge branch 'master' into feature/update-swap-flow
sadiabbasi Dec 16, 2025
df4e3c7
Merge pull request #182 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 16, 2025
c9c368d
chore(release): 1.5.1 [skip ci]
semantic-release-bot Dec 16, 2025
fa3c243
fix: :zap: create empty commit
sadiabbasi Dec 16, 2025
ddcd74d
Merge pull request #183 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 16, 2025
006ea73
chore(release): 1.5.1-rc.1 [skip ci]
semantic-release-bot Dec 16, 2025
58bf539
fix: :zap: updte module init
sadiabbasi Dec 16, 2025
f2c7f02
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 16, 2025
3c25cb3
Merge pull request #184 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 16, 2025
09932bb
chore(release): 1.5.1-rc.2 [skip ci]
semantic-release-bot Dec 16, 2025
c389f30
fix: :zap: added logs
sadiabbasi Dec 16, 2025
6c56f1f
Merge branch 'feature/update-swap-flow' of https://github.com/Tonomy-…
sadiabbasi Dec 16, 2025
1a46e25
fix: :zap: added logs
sadiabbasi Dec 16, 2025
7283aa9
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 16, 2025
3101fce
Merge pull request #185 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 16, 2025
11aa92d
chore(release): 1.5.1-rc.3 [skip ci]
semantic-release-bot Dec 16, 2025
7464627
fix: :zap: fixed condition
sadiabbasi Dec 16, 2025
60dd600
Merge branch 'feature/update-swap-flow' of https://github.com/Tonomy-…
sadiabbasi Dec 16, 2025
bad2802
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 16, 2025
41e588f
Merge pull request #186 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 16, 2025
99ef3c4
chore(release): 1.5.1-rc.4 [skip ci]
semantic-release-bot Dec 16, 2025
2910ae5
fix: :zap: update if condition
sadiabbasi Dec 17, 2025
9ecbad0
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 17, 2025
8ef14e5
Merge pull request #187 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 17, 2025
0070ba3
chore(release): 1.5.1-rc.5 [skip ci]
semantic-release-bot Dec 17, 2025
578e809
fix: :zap: revert the base get base token
sadiabbasi Dec 17, 2025
c90d827
fix: :zap:
sadiabbasi Dec 17, 2025
753609d
Merge branch 'master' into feature/update-swap-flow
sadiabbasi Dec 17, 2025
90661cd
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 17, 2025
1490679
Merge pull request #188 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 17, 2025
3166e6d
chore(release): 1.5.2-rc.1 [skip ci]
semantic-release-bot Dec 17, 2025
064b12f
fix: :zap: update sdk
sadiabbasi Dec 19, 2025
c0b0fcb
Merge branch 'feature/update-swap-flow' of https://github.com/Tonomy-…
sadiabbasi Dec 19, 2025
a4eb720
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 19, 2025
b7d3660
Merge pull request #189 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 19, 2025
4f2c25e
chore(release): 1.5.2-rc.2 [skip ci]
semantic-release-bot Dec 19, 2025
8516afe
fix: :zap: fixed communication service
sadiabbasi Dec 19, 2025
4a1ceca
Merge branch 'feature/update-swap-flow' of https://github.com/Tonomy-…
sadiabbasi Dec 19, 2025
f29d9ca
Merge branch 'testnet' into feature/update-swap-flow
sadiabbasi Dec 19, 2025
1eebced
Merge pull request #190 from Tonomy-Foundation/feature/update-swap-flow
sadiabbasi Dec 19, 2025
b5d6571
chore(release): 1.5.2-rc.3 [skip ci]
semantic-release-bot Dec 19, 2025
9e6d77a
feat: using the prepareTransaction
theblockstalk Dec 19, 2025
90a920d
feat: using @safe-global package
theblockstalk Dec 19, 2025
c56b385
feat: updated SDK
theblockstalk Dec 19, 2025
3f54aaa
test: skipped test
theblockstalk Dec 19, 2025
148fb65
Merge pull request #191 from Tonomy-Foundation/hotfix/using-@safe-global
theblockstalk Dec 20, 2025
d89a1c7
chore(release): 1.6.0-rc.1 [skip ci]
semantic-release-bot Dec 20, 2025
67d2c29
Merge pull request #192 from Tonomy-Foundation/testnet
sadiabbasi Dec 21, 2025
b86b606
chore(release): 1.6.0 [skip ci]
semantic-release-bot Dec 21, 2025
167a4e3
feat: rebase from master
theblockstalk Dec 21, 2025
7ee9b11
feat: merge from testnet
theblockstalk Dec 21, 2025
5dfd333
Merge branch 'master' into feature/rebase-master
theblockstalk Dec 21, 2025
d8e69eb
feat: latest SDK development release
theblockstalk Dec 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tonomy-communication",
"version": "1.5.0-development.2",
"version": "1.6.0",
"description": "",
"author": "Rebal Alhaqash",
"private": true,
Expand Down Expand Up @@ -31,7 +31,8 @@
"@nestjs/platform-socket.io": "^10.2.3",
"@nestjs/swagger": "^7.1.10",
"@nestjs/websockets": "^10.2.3",
"@tonomy/tonomy-id-sdk": "0.37.0-development.1",
"@safe-global/sdk-starter-kit": "^3.0.2",
"@tonomy/tonomy-id-sdk": "0.37.0-development.2",
"axios": "1.9.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
Expand Down
12 changes: 11 additions & 1 deletion src/baseTransferMonitor/baseTransferMonitor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,22 @@
from: string,
to: string,
amount: bigint,
event: any,

Check warning on line 39 in src/baseTransferMonitor/baseTransferMonitor.service.ts

View workflow job for this annotation

GitHub Actions / tests

Unexpected any. Specify a different type
) => {
try {
const txHash: string = event.log.transactionHash;

if (to !== settings.config.baseMintBurnAddress) {
this.logger.debug(
`Event transaction hash: tx ${txHash}, to ${to} from ${from} amount ${amount} baseMintBurnAddress ${settings.config.baseMintBurnAddress} ${
to.toLowerCase() !==
settings.config.baseMintBurnAddress?.toLowerCase()
} `,
);

if (
to.toLowerCase() !==
settings.config.baseMintBurnAddress?.toLowerCase()
) {
return;
}

Expand Down
17 changes: 14 additions & 3 deletions src/communication/communication.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@
randomString,
waitForEvmTrxFinalization,
waitForTonomyTrxFinalization,
sendSafeWalletTransfer,
prepareSafeWalletTransfer,
createAntelopeDid,
FaucetTokenMessage,
assetToDecimal,
getSigner,
} from '@tonomy/tonomy-id-sdk';
import { tonomySigner } from '../signer';
import { ethers } from 'ethers';
import settings from '../settings';
import { Decimal } from 'decimal.js';
import Debug from 'debug';
import { createSafeClient } from '@safe-global/sdk-starter-kit';

const debug = Debug('tonomy-communication:communication.service');

Check warning on line 35 in src/communication/communication.service.ts

View workflow job for this annotation

GitHub Actions / tests

'debug' is assigned a value but never used

@Injectable()
export class CommunicationService {
Expand Down Expand Up @@ -196,10 +198,18 @@

if (settings.env === 'production') {
// Need to do a more complicated DAO transaction...
const safeClientResult = await sendSafeWalletTransfer(
const transactions = await prepareSafeWalletTransfer(
baseAddress,
ethAmount,
);
const safeClient = await createSafeClient({
provider: getSettings().baseRpcUrl,
signer: getSettings().basePrivateKey,
safeAddress: getSettings().baseMintBurnAddress, // This is a nested safe in production
apiKey: getSettings().safeApiKey,
});

const safeClientResult = await safeClient.send({ transactions });
const trxHash = safeClientResult.transactions?.ethereumTxHash;

if (!trxHash) {
Expand All @@ -215,7 +225,8 @@
`[Swap T->B: ${loggerId}]: Safe wallet transfer to Base address ${baseAddress} submitted with transaction hash ${trxHash}`,
);
} else {
const mintTrx = await getBaseTokenContract().transfer(
const signer = getSigner();
const mintTrx = await getBaseTokenContract(signer).transfer(
baseAddress,
ethAmount,
);
Expand Down
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ setSettings({
baseNetwork: settings.config.baseNetwork,
baseRpcUrl: settings.config.baseRpcUrl,
baseTokenAddress: settings.config.baseTokenAddress,
baseMintBurnAddress: settings.config.baseMintBurnAddress,
safeApiKey: settings.secrets.safeApiKey,
});

async function bootstrap() {
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3730,12 +3730,11 @@ __metadata:
languageName: node
linkType: hard

"@tonomy/tonomy-id-sdk@npm:0.37.0-development.1":
version: 0.37.0-development.1
resolution: "@tonomy/tonomy-id-sdk@npm:0.37.0-development.1"
"@tonomy/tonomy-id-sdk@npm:0.37.0-development.2":
version: 0.37.0-development.2
resolution: "@tonomy/tonomy-id-sdk@npm:0.37.0-development.2"
dependencies:
"@consento/sync-randombytes": "npm:^1.0.5"
"@safe-global/sdk-starter-kit": "npm:^3.0.2"
"@tonomy/antelope-did-resolver": "npm:^0.10.0"
"@veramo/core": "npm:^6.0.0"
"@veramo/credential-w3c": "npm:^6.0.0"
Expand All @@ -3761,7 +3760,7 @@ __metadata:
typeorm: "npm:0.3.22"
universal-base64url: "npm:^1.1.0"
web-did-resolver: "npm:^2.0.27"
checksum: 10c0/d57e8bae046e9a573a56b5e4b36dca2d3bb5afd33f105b1509ec143af7672499f36c05f94e7adbdf1d796edec61e12ba6506f20c15b8fd35f97c238d9a0c4d17
checksum: 10c0/9aeb510ac542e34b3631e7a7a3ff8e5173bb9810b232053f9d32c0c1f5434a8ec49b3407f2709b06aea0174bb6497473da185231831901967232688f4620df4b
languageName: node
linkType: hard

Expand Down Expand Up @@ -13789,8 +13788,9 @@ __metadata:
"@nestjs/swagger": "npm:^7.1.10"
"@nestjs/testing": "npm:^10.2.3"
"@nestjs/websockets": "npm:^10.2.3"
"@safe-global/sdk-starter-kit": "npm:^3.0.2"
"@semantic-release/git": "npm:^10.0.1"
"@tonomy/tonomy-id-sdk": "npm:0.37.0-development.1"
"@tonomy/tonomy-id-sdk": "npm:0.37.0-development.2"
"@types/eslint__js": "npm:^8.42.3"
"@types/express": "npm:^4.17.13"
"@types/jest": "npm:^29.5.14"
Expand Down
Loading