@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "warp-contracts",
|
"name": "warp-contracts",
|
||||||
"version": "1.4.11",
|
"version": "1.4.12",
|
||||||
"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",
|
||||||
|
|||||||
@@ -102,9 +102,11 @@ describe('Evaluation options evaluator', () => {
|
|||||||
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
|
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
|
expect(
|
||||||
|
new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
|
||||||
internalWrites: false
|
internalWrites: false
|
||||||
}).rootOptions).toEqual({
|
}).rootOptions
|
||||||
|
).toEqual({
|
||||||
allowBigInt: false,
|
allowBigInt: false,
|
||||||
cacheEveryNInteractions: -1,
|
cacheEveryNInteractions: -1,
|
||||||
gasLimit: 2222,
|
gasLimit: 2222,
|
||||||
@@ -129,9 +131,11 @@ describe('Evaluation options evaluator', () => {
|
|||||||
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
|
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
|
expect(
|
||||||
unsafeClient: 'throw'
|
new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
|
||||||
}).rootOptions).toEqual({
|
unsafeClient: 'throw'
|
||||||
|
}).rootOptions
|
||||||
|
).toEqual({
|
||||||
allowBigInt: false,
|
allowBigInt: false,
|
||||||
cacheEveryNInteractions: -1,
|
cacheEveryNInteractions: -1,
|
||||||
gasLimit: 2222,
|
gasLimit: 2222,
|
||||||
@@ -156,9 +160,11 @@ describe('Evaluation options evaluator', () => {
|
|||||||
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
|
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
|
expect(
|
||||||
unsafeClient: 'skip'
|
new EvaluationOptionsEvaluator(contract2.evaluationOptions(), {
|
||||||
}).rootOptions).toEqual({
|
unsafeClient: 'skip'
|
||||||
|
}).rootOptions
|
||||||
|
).toEqual({
|
||||||
allowBigInt: false,
|
allowBigInt: false,
|
||||||
cacheEveryNInteractions: -1,
|
cacheEveryNInteractions: -1,
|
||||||
gasLimit: 2222,
|
gasLimit: 2222,
|
||||||
@@ -183,7 +189,6 @@ describe('Evaluation options evaluator', () => {
|
|||||||
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
|
walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const contract3 = warp.contract(null).setEvaluationOptions({
|
const contract3 = warp.contract(null).setEvaluationOptions({
|
||||||
internalWrites: false,
|
internalWrites: false,
|
||||||
unsafeClient: 'throw',
|
unsafeClient: 'throw',
|
||||||
@@ -210,7 +215,6 @@ describe('Evaluation options evaluator', () => {
|
|||||||
}).toThrow('Cannot proceed with contract evaluation.');
|
}).toThrow('Cannot proceed with contract evaluation.');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it('should properly set foreign evaluation options - unsafeClient - allow', async () => {
|
it('should properly set foreign evaluation options - unsafeClient - allow', async () => {
|
||||||
const contract = warp.contract(null).setEvaluationOptions({
|
const contract = warp.contract(null).setEvaluationOptions({
|
||||||
unsafeClient: 'allow'
|
unsafeClient: 'allow'
|
||||||
|
|||||||
Reference in New Issue
Block a user