@algorandfoundation/algorand-typescript-testing 1.0.2-beta.3 → 1.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{arc4-DS0Hi_EY.js → arc4-DKG6fACw.js} +7 -12
- package/arc4-DKG6fACw.js.map +1 -0
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/{inner-transactions-DD57S6z9.js → inner-transactions-DBQl17y0.js} +35 -9
- package/inner-transactions-DBQl17y0.js.map +1 -0
- package/internal/arc4.mjs +4 -4
- package/internal/index.mjs +30 -11
- package/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/{program-factory-C9d-FSGp.js → program-factory-C86P19hT.js} +35 -8
- package/program-factory-C86P19hT.js.map +1 -0
- package/{runtime-helpers-BfpGXQyk.js → runtime-helpers-B49EGsTy.js} +16 -2
- package/runtime-helpers-B49EGsTy.js.map +1 -0
- package/runtime-helpers.mjs +1 -1
- package/test-transformer/jest-transformer.mjs +1 -1
- package/test-transformer/vitest-transformer.mjs +1 -1
- package/arc4-DS0Hi_EY.js.map +0 -1
- package/inner-transactions-DD57S6z9.js.map +0 -1
- package/program-factory-C9d-FSGp.js.map +0 -1
- package/runtime-helpers-BfpGXQyk.js.map +0 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as arc4$1 from '@algorandfoundation/algorand-typescript/arc4';
|
|
2
2
|
import { OnCompleteAction } from '@algorandfoundation/algorand-typescript';
|
|
3
|
-
import {
|
|
3
|
+
import { b as getContractMethod, g as getContractMethodAbiMetadata, C as Contract, c as abimethod, d as baremethod, r as readonly } from './runtime-helpers-B49EGsTy.js';
|
|
4
4
|
import { v as lazyContext, a0 as sizeOf } from './utils-fy0_Fvxl.js';
|
|
5
|
-
import {
|
|
6
|
-
import { A as ApplicationCallInnerTxnContext, m as methodSelector } from './inner-transactions-DD57S6z9.js';
|
|
5
|
+
import { A as ApplicationCallInnerTxnContext, m as methodSelector } from './inner-transactions-DBQl17y0.js';
|
|
7
6
|
import { A as Address, B as Bool, c as Byte, d as DynamicArray, D as DynamicBytes, F as FixedArray, R as ReferenceArray, e as StaticArray, f as StaticBytes, S as Str, h as Struct, T as Tuple, i as UFixed, U as Uint, j as convertBytes, k as decodeArc4, l as encodeArc4 } from './asset-params-BpG3snO3.js';
|
|
8
7
|
|
|
9
8
|
function _mergeNamespaces(n, m) {
|
|
@@ -37,7 +36,7 @@ function compileArc4(contract, options) {
|
|
|
37
36
|
call: new Proxy({}, {
|
|
38
37
|
get: (_target, prop) => {
|
|
39
38
|
return (methodArgs) => {
|
|
40
|
-
const selector = methodSelector(prop, contract);
|
|
39
|
+
const selector = methodSelector({ method: prop, contract });
|
|
41
40
|
const abiMetadata = getContractMethodAbiMetadata(contract, prop);
|
|
42
41
|
const onCompleteActions = abiMetadata?.allowActions?.map((action) => OnCompleteAction[action]);
|
|
43
42
|
const itxnContext = ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields({
|
|
@@ -87,7 +86,7 @@ const getCommonApplicationCallFields = (app, options) => ({
|
|
|
87
86
|
/** @internal */
|
|
88
87
|
function getApplicationCallInnerTxnContext(method, methodArgs, contract) {
|
|
89
88
|
const abiMetadata = contract ? getContractMethodAbiMetadata(contract, method.name) : undefined;
|
|
90
|
-
const selector = methodSelector(method, contract);
|
|
89
|
+
const selector = methodSelector({ method, contract });
|
|
91
90
|
return ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields({
|
|
92
91
|
...methodArgs,
|
|
93
92
|
onCompletion: methodArgs.onCompletion ?? abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])[0],
|
|
@@ -95,12 +94,8 @@ function getApplicationCallInnerTxnContext(method, methodArgs, contract) {
|
|
|
95
94
|
}
|
|
96
95
|
/** @internal */
|
|
97
96
|
function abiCall(contractFullName, method, methodArgs) {
|
|
98
|
-
const contract =
|
|
99
|
-
|
|
100
|
-
throw new InternalError(`Unknown contract: ${contractFullName}`);
|
|
101
|
-
if (!Object.hasOwn(contract.prototype, method))
|
|
102
|
-
throw new InternalError(`Unknown method: ${method} in contract: ${contractFullName}`);
|
|
103
|
-
const itxnContext = getApplicationCallInnerTxnContext(contract.prototype[method], methodArgs, contract);
|
|
97
|
+
const { method: methodInstance, contract: contractInstance } = getContractMethod(contractFullName, method);
|
|
98
|
+
const itxnContext = getApplicationCallInnerTxnContext(methodInstance, methodArgs, contractInstance);
|
|
104
99
|
invokeAbiCall(itxnContext);
|
|
105
100
|
return {
|
|
106
101
|
itxn: itxnContext,
|
|
@@ -140,4 +135,4 @@ var arc4 = /*#__PURE__*/_mergeNamespaces({
|
|
|
140
135
|
}, [arc4$1]);
|
|
141
136
|
|
|
142
137
|
export { arc4 as a, abiCall as b, compileArc4 as c, getApplicationCallInnerTxnContext as g };
|
|
143
|
-
//# sourceMappingURL=arc4-
|
|
138
|
+
//# sourceMappingURL=arc4-DKG6fACw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arc4-DKG6fACw.js","sources":["../src/impl/c2c.ts","../src/internal/arc4.ts"],"sourcesContent":["import { type CompileContractOptions, type Contract, OnCompleteAction } from '@algorandfoundation/algorand-typescript'\nimport type {\n BareCreateApplicationCallFields,\n ContractProxy,\n TypedApplicationCallFields,\n} from '@algorandfoundation/algorand-typescript/arc4'\nimport { getContractMethod, getContractMethodAbiMetadata } from '../abi-metadata'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { ConstructorFor, DeliberateAny, InstanceMethod } from '../typescript-helpers'\nimport type { ApplicationCallInnerTxn } from './inner-transactions'\nimport { ApplicationCallInnerTxnContext } from './inner-transactions'\nimport { methodSelector } from './method-selector'\nimport type { ApplicationData } from './reference'\n\n/** @internal */\nexport function compileArc4<TContract extends Contract>(\n contract: ConstructorFor<TContract>,\n options?: CompileContractOptions,\n): ContractProxy<TContract> {\n let app: ApplicationData | undefined\n const compiledAppEntry = lazyContext.value.getCompiledAppEntry(contract)\n if (compiledAppEntry !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledAppEntry.value)\n }\n\n if (options?.templateVars) {\n Object.entries(options.templateVars).forEach(([key, value]) => {\n lazyContext.value.setTemplateVar(key, value, options.templateVarsPrefix)\n })\n }\n\n return {\n call: new Proxy({} as unknown as TContract, {\n get: (_target, prop) => {\n return (methodArgs: TypedApplicationCallFields<DeliberateAny[]>) => {\n const selector = methodSelector({ method: prop as string, contract })\n const abiMetadata = getContractMethodAbiMetadata(contract, prop as string)\n const onCompleteActions = abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])\n const itxnContext = ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields(\n {\n ...getCommonApplicationCallFields(app, options),\n onCompletion: onCompleteActions?.[0],\n ...methodArgs,\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n invokeAbiCall(itxnContext)\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n }\n },\n }),\n\n bareCreate: (methodArgs?: BareCreateApplicationCallFields) => {\n const itxnContext = ApplicationCallInnerTxnContext.createFromBareCreateApplicationCallFields({\n ...getCommonApplicationCallFields(app, options),\n ...methodArgs,\n })\n invokeAbiCall(itxnContext)\n return itxnContext\n },\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalUints: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localUints: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n } as unknown as ContractProxy<TContract>\n}\n\n/** @internal */\nexport const invokeAbiCall = (itxnContext: ApplicationCallInnerTxnContext) => {\n lazyContext.value.notifyApplicationSpies(itxnContext)\n lazyContext.txn.activeGroup.addInnerTransactionGroup(...(itxnContext.itxns ?? []), itxnContext)\n}\nconst getCommonApplicationCallFields = (app: ApplicationData | undefined, options: CompileContractOptions | undefined) => ({\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalNumUint: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalNumBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localNumUint: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localNumBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n})\n\n/** @internal */\nexport function getApplicationCallInnerTxnContext<TArgs extends DeliberateAny[], TReturn = void>(\n method: InstanceMethod<Contract, TArgs, TReturn>,\n methodArgs: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n) {\n const abiMetadata = contract ? getContractMethodAbiMetadata(contract, method.name) : undefined\n const selector = methodSelector({ method, contract })\n return ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields<TReturn>(\n {\n ...methodArgs,\n onCompletion: methodArgs.onCompletion ?? abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])[0],\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n}\n/** @internal */\nexport function abiCall<TArgs extends DeliberateAny[], TReturn>(\n contractFullName: string,\n method: string,\n methodArgs: TypedApplicationCallFields<TArgs>,\n): { itxn: ApplicationCallInnerTxn; returnValue: TReturn | undefined } {\n const { method: methodInstance, contract: contractInstance } = getContractMethod(contractFullName, method)\n\n const itxnContext = getApplicationCallInnerTxnContext<TArgs, TReturn>(methodInstance, methodArgs, contractInstance)\n\n invokeAbiCall(itxnContext)\n\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n}\n","/** @internal */\nexport * from '@algorandfoundation/algorand-typescript/arc4'\n/** @internal */\nexport { abiCall, compileArc4 } from '../impl/c2c'\n/** @internal */\nexport { abimethod, baremethod, Contract, readonly } from '../impl/contract'\n/** @internal */\nexport {\n Address,\n Bool,\n Byte,\n convertBytes,\n decodeArc4,\n DynamicArray,\n DynamicBytes,\n encodeArc4,\n FixedArray,\n ReferenceArray,\n sizeOf,\n StaticArray,\n StaticBytes,\n Str,\n Struct,\n Tuple,\n UFixed,\n Uint,\n} from '../impl/encoded-types'\n/** @internal */\nexport { methodSelector } from '../impl/method-selector'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcA;AACM,SAAU,WAAW,CACzB,QAAmC,EACnC,OAAgC,EAAA;AAEhC,IAAA,IAAI,GAAgC;IACpC,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC;AACxE,IAAA,IAAI,gBAAgB,KAAK,SAAS,EAAE;AAClC,QAAA,GAAG,GAAG,WAAW,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACzE;AAEA,IAAA,IAAI,OAAO,EAAE,YAAY,EAAE;AACzB,QAAA,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC5D,YAAA,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,kBAAkB,CAAC;AAC1E,QAAA,CAAC,CAAC;IACJ;IAEA,OAAO;AACL,QAAA,IAAI,EAAE,IAAI,KAAK,CAAC,EAA0B,EAAE;AAC1C,YAAA,GAAG,EAAE,CAAC,OAAO,EAAE,IAAI,KAAI;gBACrB,OAAO,CAAC,UAAu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EACD,QAAQ,EACR,WAAW,EAAE,gBAAgB,CAC9B;AACH;AACA;SACgB,OAAO,CACrB,gBAAwB,EACxB,MAAc,EACd,UAA6C,EAAA;AAE7C,IAAA,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAE1G,MAAM,WAAW,GAAG,iCAAiC,CAAiB,cAAc,EAAE,UAAU,EAAE,gBAAgB,CAAC;IAEnH,aAAa,CAAC,WAAW,CAAC;IAE1B,OAAO;AACL,QAAA,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,WAAW,CAAC,iBAAiB;KAC3C;AACH;;AC1HA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnCompleteAction, TransactionType } from '@algorandfoundation/algorand-typescript';
|
|
2
|
-
import { g as getContractMethodAbiMetadata, a as getContractAbiMetadata } from './runtime-helpers-
|
|
3
|
-
import { m as methodSelector, G as GlobalStateCls, L as LocalStateCls, C as ContractContext, c as checkRoutingConditions, a as createInnerTxn, A as ApplicationCallInnerTxnContext, I as ItxnParams, b as ApplicationCallTransaction, P as PaymentTransaction, K as KeyRegistrationTransaction, d as AssetConfigTransaction, e as AssetTransferTransaction, f as AssetFreezeTransaction } from './inner-transactions-
|
|
2
|
+
import { g as getContractMethodAbiMetadata, a as getContractAbiMetadata } from './runtime-helpers-B49EGsTy.js';
|
|
3
|
+
import { m as methodSelector, G as GlobalStateCls, L as LocalStateCls, C as ContractContext, c as checkRoutingConditions, a as createInnerTxn, A as ApplicationCallInnerTxnContext, I as ItxnParams, b as ApplicationCallTransaction, P as PaymentTransaction, K as KeyRegistrationTransaction, d as AssetConfigTransaction, e as AssetTransferTransaction, f as AssetFreezeTransaction } from './inner-transactions-DBQl17y0.js';
|
|
4
4
|
import { a as asNumber, U as Uint64Cls, B as BigUintCls, b as BytesCls, A as AccountCls, c as AlgoTsPrimitiveCls, i as iterBigInt, d as Uint64Map, e as AccountMap, f as asBytes, g as Asset, h as asUint64, j as Application, k as asMaybeUint64Cls, l as asUint64Cls, m as AssetHolding, n as AccountData, o as ApplicationData, p as getDefaultAssetData, q as asBigInt, r as asMaybeBytesCls, s as asUint8Array, t as ApplicationCls, M as MAX_UINT64, u as ABI_RETURN_VALUE_LOG_PREFIX, v as lazyContext, T as TRANSACTION_GROUP_MAX_SIZE, w as Uint64, x as getRandomBigInt, y as asBigUintCls, z as BigUint, C as MAX_BYTES_SIZE, D as Bytes, E as Account, F as getRandomBytes, G as AssetCls, H as MAX_UINT512, I as MAX_UINT8, J as MAX_UINT16, K as MAX_UINT32, L as MAX_UINT128, N as MAX_UINT256, O as BITS_IN_BYTE, P as BaseContract, Q as ContextManager, R as DEFAULT_TEMPLATE_VAR_PREFIX } from './utils-fy0_Fvxl.js';
|
|
5
5
|
export { S as toExternalValue } from './utils-fy0_Fvxl.js';
|
|
6
6
|
import { I as InternalError, i as invariant } from './typescript-helpers-sobuICoc.js';
|
|
@@ -103,7 +103,7 @@ class ApplicationSpy {
|
|
|
103
103
|
const metadata = getContractMethodAbiMetadata(spy.contract, methodName);
|
|
104
104
|
ocas = metadata.allowActions?.map((action) => OnCompleteAction[action]) ?? [OnCompleteAction.NoOp];
|
|
105
105
|
}
|
|
106
|
-
const selector = methodSelector(fn, spy.contract);
|
|
106
|
+
const selector = methodSelector({ method: fn, contract: spy.contract });
|
|
107
107
|
spy.onAbiCall(selector, ocas, callback);
|
|
108
108
|
};
|
|
109
109
|
},
|