Skip to content

Commit

Permalink
Update solana.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mantasfam committed Sep 25, 2024
1 parent 6b6d3d4 commit 1a71198
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/web3Provider/solana.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ export class Solana {

async getBlockNumber() {
const res = await this.call('getSlot', []);
log.info({
message: `Fetched block number: ${res}`,
detail: `solana - Fetched block number using getSlot.`,
endpoint: 'solana.getBlockNumber',
});
return res;
}

Expand All @@ -86,11 +81,6 @@ export class Solana {
res = await this.call('getBlockTime', [slot]);

if (res && !res.error) {
log.info({
message: `Found block at slot ${slot} with timestamp: ${res}`,
detail: `solana - Block found successfully.`,
endpoint: 'solana.getBlock',
});
break;
}
slot += 1;
Expand Down Expand Up @@ -162,11 +152,6 @@ class Contract {
return {
call: async () => {
const res = await this.call('getTokenSupply', [this.address]);
log.info({
message: `Total supply fetched: ${res.value.amount} for contract ${this.address}`,
detail: `solana - Fetched total supply of contract.`,
endpoint: 'solana.Contract.methods.totalSupply.call',
});
return res.value.amount;
},
};
Expand All @@ -193,14 +178,6 @@ class Contract {
}
});

log.info({
message: `Balance fetched for account ${account}: ${balance.toFixed()} for contract ${
this.address
}`,
detail: `solana - Balance fetched successfully.`,
endpoint: 'solana.Contract.methods.balanceOf.call',
});

return balance.toFixed();
},
};
Expand Down

0 comments on commit 1a71198

Please sign in to comment.