v1.4.18
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
ppedziwiatr
2023-09-06 13:59:55 +02:00
parent a426542294
commit b123ee04f3
5 changed files with 12 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "warp-contracts", "name": "warp-contracts",
"version": "1.4.17", "version": "1.4.18",
"description": "An implementation of the SmartWeave smart contract protocol.", "description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts", "types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js", "main": "./lib/cjs/index.js",

View File

@@ -9,10 +9,10 @@ import { LoggerFactory } from '../../../logging/LoggerFactory';
import { DeployPlugin } from 'warp-contracts-plugin-deploy'; import { DeployPlugin } from 'warp-contracts-plugin-deploy';
import { mineBlock } from '../_helpers'; import { mineBlock } from '../_helpers';
import { WriteInteractionResponse } from '../../../contract/Contract'; import { WriteInteractionResponse } from '../../../contract/Contract';
import { HandlerBasedContract } from "../../../contract/HandlerBasedContract"; import { HandlerBasedContract } from '../../../contract/HandlerBasedContract';
import { emptyTransfer } from "../../../contract/deploy/CreateContract"; import { emptyTransfer } from '../../../contract/deploy/CreateContract';
import { Tag } from "../../../utils/types/arweave-types"; import { Tag } from '../../../utils/types/arweave-types';
import { WARP_TAGS } from "../../../core/KnownTags"; import { WARP_TAGS } from '../../../core/KnownTags';
describe('Constructor', () => { describe('Constructor', () => {
let contractSrc: string; let contractSrc: string;
@@ -329,7 +329,10 @@ describe('Constructor', () => {
// and with the SDK version the supports constructors - results in an error thrown during internal writes // and with the SDK version the supports constructors - results in an error thrown during internal writes
// discovery - in other words, it is not possible to create any interaction with such contract. // discovery - in other words, it is not possible to create any interaction with such contract.
const hackyTransaction = await (withoutConstructorContract as HandlerBasedContract<any>).createInteraction( const hackyTransaction = await (withoutConstructorContract as HandlerBasedContract<any>).createInteraction(
{ function: "doWrite" }, [new Tag(WARP_TAGS.INTERACT_WRITE, readExternalContract.txId())], emptyTransfer, false { function: 'doWrite' },
[new Tag(WARP_TAGS.INTERACT_WRITE, readExternalContract.txId())],
emptyTransfer,
false
); );
await warp.arweave.transactions.post(hackyTransaction); await warp.arweave.transactions.post(hackyTransaction);

View File

@@ -7,7 +7,7 @@ import {
import { GQLNodeInterface } from '../../legacy/gqlResult'; import { GQLNodeInterface } from '../../legacy/gqlResult';
import { LoggerFactory } from '../../logging/LoggerFactory'; import { LoggerFactory } from '../../logging/LoggerFactory';
import { WarpFactory } from '../../core/WarpFactory'; import { WarpFactory } from '../../core/WarpFactory';
import { NetworkCommunicationError } from "../../utils/utils"; import { NetworkCommunicationError } from '../../utils/utils';
const responseData = { const responseData = {
paging: { paging: {

View File

@@ -11,7 +11,7 @@ import {
NonWhitelistedSourceError NonWhitelistedSourceError
} from '../HandlerExecutorFactory'; } from '../HandlerExecutorFactory';
import { AbstractContractHandler } from './AbstractContractHandler'; import { AbstractContractHandler } from './AbstractContractHandler';
import { NetworkCommunicationError } from "../../../../utils/utils"; import { NetworkCommunicationError } from '../../../../utils/utils';
export class WasmHandlerApi<State> extends AbstractContractHandler<State> { export class WasmHandlerApi<State> extends AbstractContractHandler<State> {
constructor( constructor(

View File

@@ -1,7 +1,7 @@
/* eslint-disable */ /* eslint-disable */
import copy from 'fast-copy'; import copy from 'fast-copy';
import { Buffer } from 'warp-isomorphic'; import { Buffer } from 'warp-isomorphic';
import { KnownErrors } from "../core/modules/impl/handler/JsHandlerApi"; import { KnownErrors } from '../core/modules/impl/handler/JsHandlerApi';
export const sleep = (ms: number): Promise<void> => { export const sleep = (ms: number): Promise<void> => {
return new Promise((resolve) => setTimeout(resolve, ms)); return new Promise((resolve) => setTimeout(resolve, ms));