@@ -1224,7 +1224,7 @@ describe('address tests', () => {
1224
1224
1225
1225
const tx : DbTxRaw = {
1226
1226
tx_id : '0x1234' ,
1227
- tx_index : 4 ,
1227
+ tx_index : 9 ,
1228
1228
anchor_mode : 3 ,
1229
1229
nonce : 0 ,
1230
1230
raw_tx : bufferToHex ( Buffer . from ( '' ) ) ,
@@ -1416,7 +1416,7 @@ describe('address tests', () => {
1416
1416
} ;
1417
1417
const contractCall : DbTx = {
1418
1418
tx_id : '0x1232000000000000000000000000000000000000000000000000000000000000' ,
1419
- tx_index : 5 ,
1419
+ tx_index : 10 ,
1420
1420
anchor_mode : 3 ,
1421
1421
nonce : 0 ,
1422
1422
index_block_hash : block . index_block_hash ,
@@ -1775,18 +1775,19 @@ describe('address tests', () => {
1775
1775
total : 5 ,
1776
1776
results : [
1777
1777
{
1778
- tx_id : '0x12340005 ' ,
1778
+ tx_id : '0x1232000000000000000000000000000000000000000000000000000000000000 ' ,
1779
1779
tx_status : 'success' ,
1780
1780
tx_result : {
1781
1781
hex : '0x0100000000000000000000000000000001' , // u1
1782
1782
repr : 'u1' ,
1783
1783
} ,
1784
- tx_type : 'token_transfer ' ,
1785
- fee_rate : '1234 ' ,
1784
+ tx_type : 'contract_call ' ,
1785
+ fee_rate : '10 ' ,
1786
1786
is_unanchored : false ,
1787
1787
nonce : 0 ,
1788
1788
anchor_mode : 'any' ,
1789
1789
sender_address : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ,
1790
+ sponsor_address : 'ST3J8EVYHVKH6XXPD61EE8XEHW4Y2K83861225AB1' ,
1790
1791
sponsored : false ,
1791
1792
post_condition_mode : 'allow' ,
1792
1793
post_conditions : [ ] ,
@@ -1804,13 +1805,28 @@ describe('address tests', () => {
1804
1805
parent_block_hash : '0x' ,
1805
1806
parent_burn_block_time : 1626122935 ,
1806
1807
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
1807
- tx_index : 5 ,
1808
- token_transfer : {
1809
- recipient_address : 'ST3DWSXBPYDB484QXFTR81K4AWG4ZB5XZNFF3H70C' ,
1810
- amount : '15' ,
1811
- memo : '0x6869' ,
1808
+ tx_index : 10 ,
1809
+ contract_call : {
1810
+ contract_id : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ,
1811
+ function_name : 'test-contract-fn' ,
1812
+ function_signature :
1813
+ '(define-public (test-contract-fn (amount uint) (desc string-ascii)))' ,
1814
+ function_args : [
1815
+ {
1816
+ hex : '0x010000000000000000000000000001e240' ,
1817
+ name : 'amount' ,
1818
+ repr : 'u123456' ,
1819
+ type : 'uint' ,
1820
+ } ,
1821
+ {
1822
+ hex : '0x0d0000000568656c6c6f' ,
1823
+ name : 'desc' ,
1824
+ repr : '"hello"' ,
1825
+ type : 'string-ascii' ,
1826
+ } ,
1827
+ ] ,
1812
1828
} ,
1813
- event_count : 0 ,
1829
+ event_count : 5 ,
1814
1830
events : [ ] ,
1815
1831
execution_cost_read_count : 0 ,
1816
1832
execution_cost_read_length : 0 ,
@@ -1819,19 +1835,18 @@ describe('address tests', () => {
1819
1835
execution_cost_write_length : 0 ,
1820
1836
} ,
1821
1837
{
1822
- tx_id : '0x1232000000000000000000000000000000000000000000000000000000000000 ' ,
1838
+ tx_id : '0x1234 ' ,
1823
1839
tx_status : 'success' ,
1824
1840
tx_result : {
1825
1841
hex : '0x0100000000000000000000000000000001' , // u1
1826
1842
repr : 'u1' ,
1827
1843
} ,
1828
- tx_type : 'contract_call ' ,
1829
- fee_rate : '10 ' ,
1844
+ tx_type : 'coinbase ' ,
1845
+ fee_rate : '1234 ' ,
1830
1846
is_unanchored : false ,
1831
1847
nonce : 0 ,
1832
1848
anchor_mode : 'any' ,
1833
- sender_address : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ,
1834
- sponsor_address : 'ST3J8EVYHVKH6XXPD61EE8XEHW4Y2K83861225AB1' ,
1849
+ sender_address : 'ST3J8EVYHVKH6XXPD61EE8XEHW4Y2K83861225AB1' ,
1835
1850
sponsored : false ,
1836
1851
post_condition_mode : 'allow' ,
1837
1852
post_conditions : [ ] ,
@@ -1849,26 +1864,10 @@ describe('address tests', () => {
1849
1864
parent_block_hash : '0x' ,
1850
1865
parent_burn_block_time : 1626122935 ,
1851
1866
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
1852
- tx_index : 5 ,
1853
- contract_call : {
1854
- contract_id : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ,
1855
- function_name : 'test-contract-fn' ,
1856
- function_signature :
1857
- '(define-public (test-contract-fn (amount uint) (desc string-ascii)))' ,
1858
- function_args : [
1859
- {
1860
- hex : '0x010000000000000000000000000001e240' ,
1861
- name : 'amount' ,
1862
- repr : 'u123456' ,
1863
- type : 'uint' ,
1864
- } ,
1865
- {
1866
- hex : '0x0d0000000568656c6c6f' ,
1867
- name : 'desc' ,
1868
- repr : '"hello"' ,
1869
- type : 'string-ascii' ,
1870
- } ,
1871
- ] ,
1867
+ tx_index : 9 ,
1868
+ coinbase_payload : {
1869
+ data : '0x636f696e62617365206869' ,
1870
+ alt_recipient : null ,
1872
1871
} ,
1873
1872
event_count : 5 ,
1874
1873
events : [ ] ,
@@ -1879,18 +1878,18 @@ describe('address tests', () => {
1879
1878
execution_cost_write_length : 0 ,
1880
1879
} ,
1881
1880
{
1882
- tx_id : '0x1234 ' ,
1881
+ tx_id : '0x12340005 ' ,
1883
1882
tx_status : 'success' ,
1884
1883
tx_result : {
1885
1884
hex : '0x0100000000000000000000000000000001' , // u1
1886
1885
repr : 'u1' ,
1887
1886
} ,
1888
- tx_type : 'coinbase ' ,
1887
+ tx_type : 'token_transfer ' ,
1889
1888
fee_rate : '1234' ,
1890
1889
is_unanchored : false ,
1891
1890
nonce : 0 ,
1892
1891
anchor_mode : 'any' ,
1893
- sender_address : 'ST3J8EVYHVKH6XXPD61EE8XEHW4Y2K83861225AB1 ' ,
1892
+ sender_address : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world ' ,
1894
1893
sponsored : false ,
1895
1894
post_condition_mode : 'allow' ,
1896
1895
post_conditions : [ ] ,
@@ -1908,12 +1907,13 @@ describe('address tests', () => {
1908
1907
parent_block_hash : '0x' ,
1909
1908
parent_burn_block_time : 1626122935 ,
1910
1909
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
1911
- tx_index : 4 ,
1912
- coinbase_payload : {
1913
- data : '0x636f696e62617365206869' ,
1914
- alt_recipient : null ,
1910
+ tx_index : 5 ,
1911
+ token_transfer : {
1912
+ recipient_address : 'ST3DWSXBPYDB484QXFTR81K4AWG4ZB5XZNFF3H70C' ,
1913
+ amount : '15' ,
1914
+ memo : '0x6869' ,
1915
1915
} ,
1916
- event_count : 5 ,
1916
+ event_count : 0 ,
1917
1917
events : [ ] ,
1918
1918
execution_cost_read_count : 0 ,
1919
1919
execution_cost_read_length : 0 ,
@@ -2054,7 +2054,7 @@ describe('address tests', () => {
2054
2054
parent_block_hash : '0x' ,
2055
2055
parent_burn_block_time : 1626122935 ,
2056
2056
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
2057
- tx_index : 5 ,
2057
+ tx_index : 10 ,
2058
2058
contract_call : {
2059
2059
contract_id : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ,
2060
2060
function_name : 'test-contract-fn' ,
@@ -2161,7 +2161,7 @@ describe('address tests', () => {
2161
2161
sponsor_address : 'ST3J8EVYHVKH6XXPD61EE8XEHW4Y2K83861225AB1' ,
2162
2162
sponsored : false ,
2163
2163
tx_id : '0x1232000000000000000000000000000000000000000000000000000000000000' ,
2164
- tx_index : 5 ,
2164
+ tx_index : 10 ,
2165
2165
tx_result : {
2166
2166
hex : '0x0100000000000000000000000000000001' ,
2167
2167
repr : 'u1' ,
@@ -2241,7 +2241,7 @@ describe('address tests', () => {
2241
2241
sponsor_address : 'ST3J8EVYHVKH6XXPD61EE8XEHW4Y2K83861225AB1' ,
2242
2242
sponsored : false ,
2243
2243
tx_id : '0x1232000000000000000000000000000000000000000000000000000000000000' ,
2244
- tx_index : 5 ,
2244
+ tx_index : 10 ,
2245
2245
tx_result : {
2246
2246
hex : '0x0100000000000000000000000000000001' ,
2247
2247
repr : 'u1' ,
@@ -2283,7 +2283,7 @@ describe('address tests', () => {
2283
2283
parent_block_hash : '0x' ,
2284
2284
parent_burn_block_time : 1626122935 ,
2285
2285
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
2286
- tx_index : 5 ,
2286
+ tx_index : 10 ,
2287
2287
contract_call : {
2288
2288
contract_id : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ,
2289
2289
function_name : 'test-contract-fn' ,
0 commit comments