Skip to content

Commit

Permalink
v1.4.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ppedziwiatr committed Jun 15, 2023
1 parent 7bc3003 commit 977ab7a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-contracts",
"version": "1.4.11",
"version": "1.4.12",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down
24 changes: 14 additions & 10 deletions src/__tests__/unit/evaluation-options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ describe('Evaluation options evaluator', () => {
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
});

expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
expect(
new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
internalWrites: false
}).rootOptions).toEqual({
}).rootOptions
).toEqual({
allowBigInt: false,
cacheEveryNInteractions: -1,
gasLimit: 2222,
Expand All @@ -129,9 +131,11 @@ describe('Evaluation options evaluator', () => {
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
});

expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
unsafeClient: 'throw'
}).rootOptions).toEqual({
expect(
new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
unsafeClient: 'throw'
}).rootOptions
).toEqual({
allowBigInt: false,
cacheEveryNInteractions: -1,
gasLimit: 2222,
Expand All @@ -156,9 +160,11 @@ describe('Evaluation options evaluator', () => {
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
});

expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
unsafeClient: 'skip'
}).rootOptions).toEqual({
expect(
new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
unsafeClient: 'skip'
}).rootOptions
).toEqual({
allowBigInt: false,
cacheEveryNInteractions: -1,
gasLimit: 2222,
Expand All @@ -183,7 +189,6 @@ describe('Evaluation options evaluator', () => {
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
});


const contract3 = warp.contract(null).setEvaluationOptions({
internalWrites: false,
unsafeClient: 'throw',
Expand All @@ -210,7 +215,6 @@ describe('Evaluation options evaluator', () => {
}).toThrow('Cannot proceed with contract evaluation.');
});


it('should properly set foreign evaluation options - unsafeClient - allow', async () => {
const contract = warp.contract(null).setEvaluationOptions({
unsafeClient: 'allow'
Expand Down

0 comments on commit 977ab7a

Please sign in to comment.