Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update folder structure and remove network providers dependency #486

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 0 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"keccak": "3.0.2"
},
"devDependencies": {
"@multiversx/sdk-network-providers": "2.6.0",
"@multiversx/sdk-wallet": "4.5.1",
"@types/assert": "1.4.6",
"@types/chai": "4.2.11",
Expand Down
6 changes: 3 additions & 3 deletions src/converters/transactionsConverters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import {
ContractResultItem,
ContractResults,
TransactionEventData,
TransactionEvent as TransactionEventOnNetwork,
TransactionEventOnNetwork,
TransactionEventTopic,
TransactionLogs as TransactionLogsOnNetwork,
TransactionLogsOnNetwork,
TransactionOnNetwork,
} from "@multiversx/sdk-network-providers";
} from "../networkProviders";
import { assert } from "chai";
import { Address } from "../address";
import { Transaction } from "../transaction";
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ export * from "./transactionWatcher";
export * from "./transactionsFactories";
export * from "./transactionsOutcomeParsers";
export * from "./utils";
export * from "./networkProviders";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ export { ProxyNetworkProvider } from "./proxyNetworkProvider";
export { AccountOnNetwork } from "./accounts";
export { ContractQueryResponse } from "./contractQueryResponse";
export { ContractResultItem, ContractResults } from "./contractResults";
export { TransactionEvent, TransactionEventData, TransactionEventTopic } from "./transactionEvents";
export { TransactionLogs } from "./transactionLogs";
export {
TransactionEvent as TransactionEventOnNetwork,
TransactionEventData,
TransactionEventTopic,
} from "./transactionEvents";
export { TransactionLogs as TransactionLogsOnNetwork } from "./transactionLogs";
export { TransactionReceipt } from "./transactionReceipt";
export { TransactionStatus } from "./transactionStatus";
export { TransactionOnNetwork } from "./transactions";
Expand All @@ -17,4 +21,3 @@ export { NetworkConfig } from "./networkConfig";
export { NetworkGeneralStatistics } from "./networkGeneralStatistics";
export { NetworkStake } from "./networkStake";
export { NetworkStatus } from "./networkStatus";

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/smartContractQueriesController.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContractQueryResponse } from "@multiversx/sdk-network-providers";
import { ContractQueryResponse } from "./networkProviders";
import BigNumber from "bignumber.js";
import { assert } from "chai";
import { QueryRunnerAdapter } from "./adapters/queryRunnerAdapter";
Expand Down
2 changes: 1 addition & 1 deletion src/smartcontracts/interaction.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContractQueryResponse } from "@multiversx/sdk-network-providers";
import { ContractQueryResponse } from "../networkProviders";
import BigNumber from "bignumber.js";
import { assert } from "chai";
import { Address } from "../address";
Expand Down
18 changes: 9 additions & 9 deletions src/smartcontracts/resultsParser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {
ContractQueryResponse,
ContractResultItem,
ContractResults,
TransactionEvent,
TransactionEventOnNetwork,
TransactionEventTopic,
TransactionLogs,
TransactionLogsOnNetwork,
TransactionOnNetwork,
} from "@multiversx/sdk-network-providers";
import { TransactionEventData } from "@multiversx/sdk-network-providers/out/transactionEvents";
TransactionEventData,
} from "../networkProviders";
import BigNumber from "bignumber.js";
import { assert } from "chai";
import * as fs from "fs";
Expand Down Expand Up @@ -220,10 +220,10 @@ describe("test smart contract results parser", () => {

it("should parse contract outcome, on signal error", async () => {
let transaction = new TransactionOnNetwork({
logs: new TransactionLogs({
logs: new TransactionLogsOnNetwork({
address: Address.empty(),
events: [
new TransactionEvent({
new TransactionEventOnNetwork({
identifier: "signalError",
topics: [new TransactionEventTopic(Buffer.from("something happened").toString("base64"))],
data: `@${Buffer.from("user error").toString("hex")}@07`,
Expand All @@ -240,10 +240,10 @@ describe("test smart contract results parser", () => {

it("should parse contract outcome, on too much gas warning", async () => {
let transaction = new TransactionOnNetwork({
logs: new TransactionLogs({
logs: new TransactionLogsOnNetwork({
address: Address.empty(),
events: [
new TransactionEvent({
new TransactionEventOnNetwork({
identifier: "writeLog",
topics: [
new TransactionEventTopic(
Expand All @@ -269,7 +269,7 @@ describe("test smart contract results parser", () => {
const abiRegistry = await loadAbiRegistry("src/testdata/esdt-safe.abi.json");
const eventDefinition = abiRegistry.getEvent("deposit");

const event = new TransactionEvent({
const event = new TransactionEventOnNetwork({
topics: [
new TransactionEventTopic("ZGVwb3NpdA=="),
new TransactionEventTopic("cmzC1LRt1r10pMhNAnFb+FyudjGMq4G8CefCYdQUmmc="),
Expand Down
2 changes: 1 addition & 1 deletion src/smartcontracts/smartContract.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TransactionStatus } from "@multiversx/sdk-network-providers";
import { TransactionStatus } from "../networkProviders";
import { assert } from "chai";
import { Address } from "../address";
import {
Expand Down
7 changes: 1 addition & 6 deletions src/testutils/mockNetworkProvider.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
ContractResultItem,
ContractResults,
TransactionOnNetwork,
TransactionStatus,
} from "@multiversx/sdk-network-providers";
import { ContractResultItem, ContractResults, TransactionOnNetwork, TransactionStatus } from "../networkProviders";
import { Address } from "../address";
import { AsyncTimer } from "../asyncTimer";
import * as errors from "../errors";
Expand Down
2 changes: 1 addition & 1 deletion src/testutils/networkProviders.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApiNetworkProvider, ProxyNetworkProvider } from "@multiversx/sdk-network-providers";
import { ApiNetworkProvider, ProxyNetworkProvider } from "../networkProviders";
import { IAddress } from "../interface";
import {
IAccountOnNetwork,
Expand Down
2 changes: 1 addition & 1 deletion src/transactionWatcher.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TransactionOnNetwork, TransactionStatus } from "@multiversx/sdk-network-providers";
import { TransactionOnNetwork, TransactionStatus } from "./networkProviders";
import { assert } from "chai";
import { MarkCompleted, MockNetworkProvider, Wait } from "./testutils";
import { TransactionHash } from "./transaction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
ContractResults,
TransactionEventTopic,
TransactionOnNetwork,
TransactionEvent as TransactionOnNetworkEvent,
TransactionLogs as TransactionOnNetworkLogs,
} from "@multiversx/sdk-network-providers";
TransactionEventOnNetwork,
TransactionLogsOnNetwork,
} from "../networkProviders";
import BigNumber from "bignumber.js";
import { assert } from "chai";
import { Address } from "../address";
Expand Down Expand Up @@ -60,9 +60,9 @@ describe("test smart contract transactions outcome parser", () => {

const transactionOnNetwork = new TransactionOnNetwork({
nonce: 7,
logs: new TransactionOnNetworkLogs({
logs: new TransactionLogsOnNetwork({
events: [
new TransactionOnNetworkEvent({
new TransactionEventOnNetwork({
identifier: "SCDeploy",
topics: [
new TransactionEventTopic(contract.getPublicKey().toString("base64")),
Expand Down Expand Up @@ -102,9 +102,9 @@ describe("test smart contract transactions outcome parser", () => {

const transactionOnNetwork = new TransactionOnNetwork({
nonce: 7,
logs: new TransactionOnNetworkLogs({
logs: new TransactionLogsOnNetwork({
events: [
new TransactionOnNetworkEvent({
new TransactionEventOnNetwork({
identifier: "signalError",
topics: [
new TransactionEventTopic(deployer.getPublicKey().toString("base64")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import {
ContractResultItem,
ContractResults,
TransactionEventData,
TransactionEvent as TransactionEventOnNetwork,
TransactionEventOnNetwork,
TransactionEventTopic,
TransactionLogs as TransactionLogsOnNetwork,
TransactionLogsOnNetwork,
TransactionOnNetwork,
} from "@multiversx/sdk-network-providers";
} from "../networkProviders";
import BigNumber from "bignumber.js";
import { assert } from "chai";
import { Address } from "../address";
Expand Down
Loading