Skip to content

Commit

Permalink
chore: warp-contracts 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiszczatowski committed Mar 23, 2023
1 parent 629b6be commit 71a23aa
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 31 deletions.
12 changes: 6 additions & 6 deletions contracts/atomic-asset-test/tests/atomic-asset.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ArLocal from 'arlocal';
import { JWKInterface } from 'arweave/node/lib/wallet';
import { getTag } from 'warp-contract-utils';
import { LoggerFactory, Warp, WarpFactory, SmartWeaveTags } from 'warp-contracts';
import { LoggerFactory, Warp, WarpFactory, SMART_WEAVE_TAGS, WARP_TAGS } from 'warp-contracts';
import { AtomicAssetState, AtomicAssetContract } from "atomic-asset-js-bindings";
import { connectAtomicAsset, deployAtomicAsset as rustDeploy } from '../rust-impl';
import { deployAtomicAsset as tsDeploy } from '../ts-impl';
Expand Down Expand Up @@ -82,13 +82,13 @@ describe('Atomic Assets', () => {

expect(contractTx).not.toBeNull();

const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SmartWeaveTags.CONTRACT_SRC_TX_ID));
const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SMART_WEAVE_TAGS. CONTRACT_SRC_TX_ID));
if (implementation === "Rust") {
expect(getTag(contractSrcTx, SmartWeaveTags.CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, SmartWeaveTags.WASM_LANG)).toEqual('rust');
expect(getTag(contractSrcTx, SMART_WEAVE_TAGS. CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, WARP_TAGS. WASM_LANG)).toEqual('rust');
} else if (implementation === "Typescript") {
expect(getTag(contractSrcTx, SmartWeaveTags.CONTENT_TYPE)).toEqual('application/javascript');
expect(getTag(contractSrcTx, SmartWeaveTags.WASM_LANG)).toEqual(false);
expect(getTag(contractSrcTx, SMART_WEAVE_TAGS. CONTENT_TYPE)).toEqual('application/javascript');
expect(getTag(contractSrcTx, WARP_TAGS. WASM_LANG)).toEqual(false);
}
});

Expand Down
8 changes: 4 additions & 4 deletions contracts/erc20/tests/erc20.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ArLocal from 'arlocal';
import { JWKInterface } from 'arweave/node/lib/wallet';
import { assert } from 'console';
import { getTag } from 'warp-contract-utils';
import { LoggerFactory, Warp, WarpFactory, SmartWeaveTags, ContractError } from 'warp-contracts';
import { LoggerFactory, Warp, WarpFactory, SMART_WEAVE_TAGS, WARP_TAGS } from 'warp-contracts';
import { DeployPlugin } from 'warp-contracts-plugin-deploy';
import { connectERC20, deployERC20, ERC20Contract, ERC20State } from '../bindings/erc20-js-binding';

Expand Down Expand Up @@ -73,9 +73,9 @@ describe('Testing the ERC20 Token', () => {

expect(contractTx).not.toBeNull();

const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SmartWeaveTags.CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SmartWeaveTags.CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, SmartWeaveTags.WASM_LANG)).toEqual('rust');
const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SMART_WEAVE_TAGS. CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SMART_WEAVE_TAGS. CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, WARP_TAGS.WASM_LANG)).toEqual('rust');
});

it('should read erc20 state and balance data', async () => {
Expand Down
9 changes: 5 additions & 4 deletions contracts/pst/tests/contract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
PstState,
Warp,
WarpFactory,
SmartWeaveTags,
SMART_WEAVE_TAGS,
WARP_TAGS,
} from 'warp-contracts';
import path from 'path';
import { getTag } from 'warp-contract-utils';
Expand Down Expand Up @@ -111,9 +112,9 @@ describe('Testing the Profit Sharing Token', () => {

expect(contractTx).not.toBeNull();

const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SmartWeaveTags.CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SmartWeaveTags.CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, SmartWeaveTags.WASM_LANG)).toEqual('rust');
const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SMART_WEAVE_TAGS. CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SMART_WEAVE_TAGS. CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, WARP_TAGS. WASM_LANG)).toEqual('rust');
});

it('should read pst state and balance data', async () => {
Expand Down
14 changes: 7 additions & 7 deletions examples/staking/tests/staking.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ArLocal from 'arlocal';
import { JWKInterface } from 'arweave/node/lib/wallet';
import { LoggerFactory, Warp, WarpFactory, SmartWeaveTags } from 'warp-contracts';
import { LoggerFactory, Warp, WarpFactory, SMART_WEAVE_TAGS, WARP_TAGS } from 'warp-contracts';

import { connectERC20, deployERC20, ERC20Contract, ERC20State } from 'erc20/bindings/erc20-js-binding';

Expand Down Expand Up @@ -95,9 +95,9 @@ describe('Testing the Staking Logic', () => {

expect(contractTx).not.toBeNull();

const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SmartWeaveTags.CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SmartWeaveTags.CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, SmartWeaveTags.WASM_LANG)).toEqual('rust');
const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SMART_WEAVE_TAGS. CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SMART_WEAVE_TAGS. CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, WARP_TAGS. WASM_LANG)).toEqual('rust');

expect(await erc20.currentState()).toEqual(initialERC20State);
});
Expand All @@ -107,9 +107,9 @@ describe('Testing the Staking Logic', () => {

expect(contractTx).not.toBeNull();

const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SmartWeaveTags.CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SmartWeaveTags.CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, SmartWeaveTags.WASM_LANG)).toEqual('rust');
const contractSrcTx = await warp.arweave.transactions.get(getTag(contractTx, SMART_WEAVE_TAGS. CONTRACT_SRC_TX_ID));
expect(getTag(contractSrcTx, SMART_WEAVE_TAGS. CONTENT_TYPE)).toEqual('application/wasm');
expect(getTag(contractSrcTx, WARP_TAGS. WASM_LANG)).toEqual('rust');

expect(await staking.currentState()).toEqual(initialStakingState);
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"arweave": "1.11.4",
"ts-jest": "^28.0.7",
"typescript": "^4.7.4",
"warp-contracts": "1.2.55",
"warp-contracts-plugin-deploy": "^1.0.0",
"warp-contracts": "1.3.1",
"warp-contracts-plugin-deploy": "^1.0.1",
"yargs": "17.5.1"
},
"resolutions": {
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6420,19 +6420,19 @@ walker@^1.0.8:
dependencies:
makeerror "1.0.12"

warp-contracts-plugin-deploy@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/warp-contracts-plugin-deploy/-/warp-contracts-plugin-deploy-1.0.0.tgz#c3d8ab88b8b838f59e34653589a82ae09dc4c86e"
integrity sha512-HU4A0GZAP6XATFv7fuHA2EUP6V+h0ZluGiv2JjH6AE6LTqFBtP+PixgtNZds5YcOf+eLO01gv15vaT7pea0W6w==
warp-contracts-plugin-deploy@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/warp-contracts-plugin-deploy/-/warp-contracts-plugin-deploy-1.0.1.tgz#8111c5a541878877c661ec02c1dbab8ceb83b765"
integrity sha512-bREwz3ICBBapMQnm+nMpvgQeZphHi6cylE/s1eF/f3AnIOi93UHOK74oCuBYcbhnqncIlSF1i77jSGLd1P8Z5g==
dependencies:
arbundles "^0.7.3"
arlocal "^1.1.59"
node-stdlib-browser "^1.2.0"

warp-contracts@1.2.55:
version "1.2.55"
resolved "https://registry.yarnpkg.com/warp-contracts/-/warp-contracts-1.2.55.tgz#278e3498b0eec099921f57a3c888ee9cd3b48b4f"
integrity sha512-bhP/5vBYjOI/qqxp8AMhO1jGjOT1w5ux11UkuELeiTI+5UCc9lTL0usBiixTWZdrIn5MzG6yOpO1K9RM3V66tQ==
warp-contracts@1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/warp-contracts/-/warp-contracts-1.3.1.tgz#a64665029a0336665ce511ce82146fc8517773a1"
integrity sha512-atT9LaJ4SOhoAtvuP5CBuSHH2K5gs2vpuNJnJGkQhtlIf/nZELy/5TJQLeUtp8u8c8JSi9BkCI/er0V8dq2M/g==
dependencies:
"@idena/vrf-js" "^1.0.1"
archiver "^5.3.0"
Expand Down

0 comments on commit 71a23aa

Please sign in to comment.