diff --git a/src/lib/compiler.ts b/src/lib/compiler.ts index 59958a8d5..9383f8a7e 100644 --- a/src/lib/compiler.ts +++ b/src/lib/compiler.ts @@ -776,16 +776,16 @@ export default class Compiler { this.pushLines( node, - `byte 0x${'FF'.repeat(64)}`, + `byte 0x${'FF'.repeat(32)}`, 'b&', 'swap', - `byte 0x${'FF'.repeat(64)}`, + `byte 0x${'FF'.repeat(32)}`, 'b&', 'swap', 'concat' ); - this.lastType = '[uint512,uint512]'; + this.lastType = '[uint256,uint256]'; }, }, ecdsa_pk_recover: { @@ -824,16 +824,16 @@ export default class Compiler { this.pushLines( node, - `byte 0x${'FF'.repeat(64)}`, + `byte 0x${'FF'.repeat(32)}`, 'b&', 'swap', - `byte 0x${'FF'.repeat(64)}`, + `byte 0x${'FF'.repeat(32)}`, 'b&', 'swap', 'concat' ); - this.lastType = '[uint512,uint512]'; + this.lastType = '[uint256,uint256]'; }, }, // Global methods diff --git a/tests/contracts/artifacts/GeneralTest.approval.teal b/tests/contracts/artifacts/GeneralTest.approval.teal index 6f3775fa2..138427570 100644 --- a/tests/contracts/artifacts/GeneralTest.approval.teal +++ b/tests/contracts/artifacts/GeneralTest.approval.teal @@ -732,9 +732,9 @@ scratchSlot: assert retsub -// ecdsa()(uint512,uint512) +// ecdsa()(uint256,uint256) abi_route_ecdsa: - // execute ecdsa()(uint512,uint512) + // execute ecdsa()(uint256,uint256) callsub ecdsa int 1 return @@ -755,10 +755,10 @@ ecdsa: // ecdsa_pk_decompress('Secp256k1', '' as StaticArray) byte 0x000000000000000000000000000000000000000000000000000000000000000000 // "" ecdsa_pk_decompress Secp256k1 - byte 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + byte 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF b& swap - byte 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + byte 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF b& swap concat @@ -770,10 +770,10 @@ ecdsa: byte 0x02 byte 0x03 ecdsa_pk_recover Secp256k1 - byte 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + byte 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF b& swap - byte 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + byte 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF b& swap concat @@ -816,7 +816,7 @@ call_NoOp: method "stringSubstring()void" method "idProperty()void" method "scratchSlot()void" - method "ecdsa()(uint512,uint512)" + method "ecdsa()(uint256,uint256)" txna ApplicationArgs 0 match abi_route_txnTypeEnum abi_route_txnGroupLength abi_route_asserts abi_route_verifyTxnFromArg abi_route_verifyTxnFromTxnGroup abi_route_verifyTxnCondition abi_route_verifyTxnIncludedIn abi_route_verifyTxnNotIncludedIn abi_route_submitPendingGroup abi_route_methodWithTxnArgs abi_route_shift abi_route_fromBytes abi_route_fromID abi_route_bzeroFunction abi_route_events abi_route_letOptimization abi_route_staticContractProperties abi_route_numberToString abi_route_methodOnParens abi_route_stringSubstring abi_route_idProperty abi_route_scratchSlot abi_route_ecdsa err diff --git a/tests/contracts/artifacts/GeneralTest.arc32.json b/tests/contracts/artifacts/GeneralTest.arc32.json index ac417a024..f2a5791d6 100644 --- a/tests/contracts/artifacts/GeneralTest.arc32.json +++ b/tests/contracts/artifacts/GeneralTest.arc32.json @@ -110,7 +110,7 @@ "no_op": "CALL" } }, - "ecdsa()(uint512,uint512)": { + "ecdsa()(uint256,uint256)": { "call_config": { "no_op": "CALL" } @@ -149,7 +149,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDkKCi8vIFRoaXMgVEVBTCB3YXMgZ2VuZXJhdGVkIGJ5IFRFQUxTY3JpcHQgdjAuNjIuMQovLyBodHRwczovL2dpdGh1Yi5jb20vYWxnb3JhbmRmb3VuZGF0aW9uL1RFQUxTY3JpcHQKCi8vIFRoaXMgY29udHJhY3QgaXMgY29tcGxpYW50IHdpdGggYW5kL29yIGltcGxlbWVudHMgdGhlIGZvbGxvd2luZyBBUkNzOiBbIEFSQzQgXQoKLy8gVGhlIGZvbGxvd2luZyB0ZW4gbGluZXMgb2YgVEVBTCBoYW5kbGUgaW5pdGlhbCBwcm9ncmFtIGZsb3cKLy8gVGhpcyBwYXR0ZXJuIGlzIHVzZWQgdG8gbWFrZSBpdCBlYXN5IGZvciBhbnlvbmUgdG8gcGFyc2UgdGhlIHN0YXJ0IG9mIHRoZSBwcm9ncmFtIGFuZCBkZXRlcm1pbmUgaWYgYSBzcGVjaWZpYyBhY3Rpb24gaXMgYWxsb3dlZAovLyBIZXJlLCBhY3Rpb24gcmVmZXJzIHRvIHRoZSBPbkNvbXBsZXRlIGluIGNvbWJpbmF0aW9uIHdpdGggd2hldGhlciB0aGUgYXBwIGlzIGJlaW5nIGNyZWF0ZWQgb3IgY2FsbGVkCi8vIEV2ZXJ5IHBvc3NpYmxlIGFjdGlvbiBmb3IgdGhpcyBjb250cmFjdCBpcyByZXByZXNlb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2lkUHJvcGVydHkgYWJpX3JvdXRlX3NjcmF0Y2hTbG90IGFiaV9yb3V0ZV9lY2RzYQoJZXJyCgppbnRUb0FzY2lpOgoJcHJvdG8gMSAxCglieXRlIDB4MzAzMTMyMzMzNDM1MzYzNzM4MzkgLy8gIjAxMjM0NTY3ODkiCglmcmFtZV9kaWcgLTEgLy8gaTogdWludDY0CglpbnQgMQoJZXh0cmFjdDMKCXJldHN1YgoJCgppdG9hOgoJcHJvdG8gMSAxCglmcmFtZV9kaWcgLTEgLy8gaTogdWludDY0CglpbnQgMAoJPT0KCWJ6IGl0b2FfaWZfZW5kCglieXRlIDB4MTUxZjdjNzUwMDAxMzAKCWxvZwoJcmV0c3ViCgppdG9hX2lmX2VuZDoKCWZyYW1lX2RpZyAtMSAvLyBpOiB1aW50NjQKCWludCAxMAoJLwoJaW50IDAKCT4KCWJ6IGl0b2FfdGVybmFyeV9mYWxzZQoJZnJhbWVfZGlnIC0xIC8vIGk6IHVpbnQ2NAoJaW50IDEwCgkvCgljYWxsc3ViIGl0b2EKCWIgaXRvYV90ZXJuYXJ5X2VuZAoKaXRvYV90ZXJuYXJ5X2ZhbHNlOgoJYnl0ZSAweCAvLyAiIgoKaXRvYV90ZXJuYXJ5X2VuZDoKCWZyYW1lX2RpZyAtMSAvLyBpOiB1aW50NjQKCWludCAxMAoJJQoJY2FsbHN1YiBpbnRUb0FzY2lpCgljb25jYXQKCXJldHN1Yg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDk=" }, "contract": { @@ -382,7 +382,7 @@ "args": [], "desc": "", "returns": { - "type": "(uint512,uint512)", + "type": "(uint256,uint256)", "desc": "" } }, diff --git a/tests/contracts/artifacts/GeneralTest.arc4.json b/tests/contracts/artifacts/GeneralTest.arc4.json index 504fe2dd7..740b6cf44 100644 --- a/tests/contracts/artifacts/GeneralTest.arc4.json +++ b/tests/contracts/artifacts/GeneralTest.arc4.json @@ -228,7 +228,7 @@ "args": [], "desc": "", "returns": { - "type": "(uint512,uint512)", + "type": "(uint256,uint256)", "desc": "" } }, diff --git a/tests/contracts/general.algo.ts b/tests/contracts/general.algo.ts index 87b619552..bd6e67782 100644 --- a/tests/contracts/general.algo.ts +++ b/tests/contracts/general.algo.ts @@ -147,7 +147,7 @@ class GeneralTest extends Contract { assert(this.scratch.value === 1337); } - ecdsa(): [uint<512>, uint<512>] { + ecdsa(): [uint<256>, uint<256>] { ecdsa_verify('Secp256k1', '' as StaticArray, 1, 2, 3, 4); ecdsa_pk_decompress('Secp256k1', '' as StaticArray); return ecdsa_pk_recover('Secp256k1', '' as StaticArray, 1, 2, 3); diff --git a/types/global.d.ts b/types/global.d.ts index de1756ce4..dde5c4381 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -857,10 +857,10 @@ declare function sha3_256(data: BytesLike): StaticArray; declare function ecdsa_verify( curve: 'Secp256k1' | 'Secp256r1', data: StaticArray, - sSignatureComponent: uint<512>, - rSignatureComponent: uint<512>, - xPubkeyComponent: uint<512>, - yPubkeyComponent: uint<512> + sSignatureComponent: uint<256>, + rSignatureComponent: uint<256>, + xPubkeyComponent: uint<256>, + yPubkeyComponent: uint<256> ): boolean; /** @@ -873,7 +873,7 @@ declare function ecdsa_verify( declare function ecdsa_pk_decompress( curve: 'Secp256k1' | 'Secp256r1', pubKey: StaticArray -): [uint<512>, uint<512>]; +): [uint<256>, uint<256>]; /** * @@ -889,9 +889,9 @@ declare function ecdsa_pk_recover( curve: 'Secp256k1' | 'Secp256r1', data: StaticArray, recoveryID: uint64, - sSignatureComponent: uint<512>, - rSignatureComponent: uint<512> -): [uint<512>, uint<512>]; + sSignatureComponent: uint<256>, + rSignatureComponent: uint<256> +): [uint<256>, uint<256>]; /** * Returns zero bytes of the given size.