Skip to content

Commit 6c9eb1b

Browse files
committed
feat: add all TVM 12 instuctions
1 parent 34f1972 commit 6c9eb1b

File tree

6 files changed

+1902
-953
lines changed

6 files changed

+1902
-953
lines changed

data/cell_deserialize.json

Lines changed: 350 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,6 +1860,356 @@
18601860
}
18611861
}
18621862
},
1863+
"LDSTDADDR": {
1864+
"description": {
1865+
"short": "Loads a `MsgAddressInt` with tag `addr_std$10`.",
1866+
"long": "Loads a `MsgAddressInt` with tag `addr_std$10` from _Slice_ `s` and pushes the loaded `addr` value onto the stack along with _Slice_ `s'` with the remaining data. If the address is not `addr_std$10`, throws an exception.",
1867+
"tags": ["address", "slice parsing"],
1868+
"operands": [],
1869+
"exit_codes": [
1870+
{
1871+
"errno": "9",
1872+
"condition": "Cannot load a MsgAddressInt."
1873+
}
1874+
]
1875+
},
1876+
"signature": {
1877+
"inputs": {
1878+
"stack": [
1879+
{
1880+
"type": "simple",
1881+
"name": "s",
1882+
"value_types": ["Slice"]
1883+
}
1884+
]
1885+
},
1886+
"outputs": {
1887+
"stack": [
1888+
{
1889+
"type": "simple",
1890+
"name": "addr",
1891+
"value_types": ["Slice"]
1892+
},
1893+
{
1894+
"type": "simple",
1895+
"name": "s'",
1896+
"value_types": ["Slice"]
1897+
}
1898+
]
1899+
}
1900+
}
1901+
},
1902+
"LDSTDADDRQ": {
1903+
"description": {
1904+
"short": "Quietly loads a `MsgAddressInt` with tag `addr_std$10`.",
1905+
"long": "Loads a `MsgAddressInt` with tag `addr_std$10` from _Slice_ `s` and pushes the loaded `addr` value onto the stack along with _Slice_ `s'` with the remaining data. This is a quiet version of `LDSTDADDR` which means that instead of throwing an exception, it pushes a status flag to the stack: 0 if the operation fails, -1 if the operation succeeds.",
1906+
"tags": ["address", "slice parsing"],
1907+
"operands": []
1908+
},
1909+
"signature": {
1910+
"inputs": {
1911+
"stack": [
1912+
{
1913+
"type": "simple",
1914+
"name": "s",
1915+
"value_types": ["Slice"]
1916+
}
1917+
]
1918+
},
1919+
"outputs": {
1920+
"stack": [
1921+
{
1922+
"type": "conditional",
1923+
"name": "status",
1924+
"match": [
1925+
{
1926+
"value": 0,
1927+
"stack": [
1928+
{
1929+
"type": "simple",
1930+
"name": "s",
1931+
"value_types": ["Slice"]
1932+
}
1933+
]
1934+
},
1935+
{
1936+
"value": -1,
1937+
"stack": [
1938+
{
1939+
"type": "simple",
1940+
"name": "addr",
1941+
"value_types": ["Slice"]
1942+
},
1943+
{
1944+
"type": "simple",
1945+
"name": "s'",
1946+
"value_types": ["Slice"]
1947+
}
1948+
]
1949+
}
1950+
]
1951+
},
1952+
{
1953+
"type": "simple",
1954+
"name": "status",
1955+
"value_types": ["Int"]
1956+
}
1957+
]
1958+
}
1959+
}
1960+
},
1961+
"LDOPTSTDADDR": {
1962+
"description": {
1963+
"short": "Loads a `MsgAddressInt` with tag `addr_std$10` or `addr_none$00`.",
1964+
"long": "Loads a `MsgAddressInt` with tag `addr_std$10` or `addr_none$00` from _Slice_ `s`. If the address is `addr_std$10`, pushes the loaded `addr` value onto the stack. If the address is `addr_none$00`, pushes a `Null`. If the address has any other tag, throws an exception.",
1965+
"tags": ["address", "slice parsing"],
1966+
"operands": [],
1967+
"exit_codes": [
1968+
{
1969+
"errno": "9",
1970+
"condition": "Cannot load a MsgAddressInt."
1971+
}
1972+
]
1973+
},
1974+
"signature": {
1975+
"inputs": {
1976+
"stack": [
1977+
{
1978+
"type": "simple",
1979+
"name": "s",
1980+
"value_types": ["Slice"]
1981+
}
1982+
]
1983+
},
1984+
"outputs": {
1985+
"stack": [
1986+
{
1987+
"type": "simple",
1988+
"name": "addr",
1989+
"value_types": ["Slice", "Null"]
1990+
},
1991+
{
1992+
"type": "simple",
1993+
"name": "s'",
1994+
"value_types": ["Slice"]
1995+
}
1996+
]
1997+
}
1998+
}
1999+
},
2000+
"LDOPTSTDADDRQ": {
2001+
"description": {
2002+
"short": "Quietly loads a `MsgAddressInt` with tag `addr_std$10` or `addr_none$00`.",
2003+
"long": "Loads a `MsgAddressInt` with tag `addr_std$10` or `addr_none$00` from _Slice_ `s`. If the address is `addr_std$10`, pushes the loaded `addr` value onto the stack. If the address is `addr_none$00`, pushes a `Null`. If the address has any other tag, pushes a status flag 0. This is a quiet version of `LDOPTSTDADDR` which means that instead of throwing an exception, it pushes a status flag to the stack: 0 if the operation fails, -1 if the operation succeeds.",
2004+
"tags": ["address", "slice parsing"],
2005+
"operands": []
2006+
},
2007+
"signature": {
2008+
"inputs": {
2009+
"stack": [
2010+
{
2011+
"type": "simple",
2012+
"name": "s",
2013+
"value_types": ["Slice"]
2014+
}
2015+
]
2016+
},
2017+
"outputs": {
2018+
"stack": [
2019+
{
2020+
"type": "conditional",
2021+
"name": "status",
2022+
"match": [
2023+
{
2024+
"value": 0,
2025+
"stack": [
2026+
{
2027+
"type": "simple",
2028+
"name": "s",
2029+
"value_types": ["Slice"]
2030+
}
2031+
]
2032+
},
2033+
{
2034+
"value": -1,
2035+
"stack": [
2036+
{
2037+
"type": "simple",
2038+
"name": "addr",
2039+
"value_types": ["Slice", "Null"]
2040+
},
2041+
{
2042+
"type": "simple",
2043+
"name": "s'",
2044+
"value_types": ["Slice"]
2045+
}
2046+
]
2047+
}
2048+
]
2049+
},
2050+
{
2051+
"type": "simple",
2052+
"name": "status",
2053+
"value_types": ["Int"]
2054+
}
2055+
]
2056+
}
2057+
}
2058+
},
2059+
"STSTDADDR": {
2060+
"description": {
2061+
"short": "Stores a `MsgAddressInt` with tag `addr_std$10`.",
2062+
"long": "Stores a `MsgAddressInt` with tag `addr_std$10` from _Slice_ `s` into _Builder_ `b`, returning the updated builder `b'`. If the address is not `addr_std$10`, throws an exception.",
2063+
"tags": ["address"],
2064+
"operands": [],
2065+
"exit_codes": [
2066+
{
2067+
"errno": "9",
2068+
"condition": "Cannot load a MsgAddressInt."
2069+
}
2070+
]
2071+
},
2072+
"signature": {
2073+
"inputs": {
2074+
"stack": [
2075+
{
2076+
"type": "simple",
2077+
"name": "s",
2078+
"value_types": ["Slice"]
2079+
},
2080+
{
2081+
"type": "simple",
2082+
"name": "b",
2083+
"value_types": ["Builder"]
2084+
}
2085+
]
2086+
},
2087+
"outputs": {
2088+
"stack": [
2089+
{
2090+
"type": "simple",
2091+
"name": "b'",
2092+
"value_types": ["Builder"]
2093+
}
2094+
]
2095+
}
2096+
}
2097+
},
2098+
"STSTDADDRQ": {
2099+
"description": {
2100+
"short": "Quietly stores a `MsgAddressInt` with tag `addr_std$10`.",
2101+
"long": "Stores a `MsgAddressInt` with tag `addr_std$10` from _Slice_ `s` into _Builder_ `b`, returning the updated builder `b'`. This is a quiet version of `STSTDADDR` which means that instead of throwing an exception, it pushes a status flag to the stack: 0 if the operation succeeds, -1 if the operation fails.",
2102+
"tags": ["address"],
2103+
"operands": []
2104+
},
2105+
"signature": {
2106+
"inputs": {
2107+
"stack": [
2108+
{
2109+
"type": "simple",
2110+
"name": "s",
2111+
"value_types": ["Slice"]
2112+
},
2113+
{
2114+
"type": "simple",
2115+
"name": "b",
2116+
"value_types": ["Builder"]
2117+
}
2118+
]
2119+
},
2120+
"outputs": {
2121+
"stack": [
2122+
{
2123+
"type": "simple",
2124+
"name": "b'",
2125+
"value_types": ["Builder"]
2126+
},
2127+
{
2128+
"type": "simple",
2129+
"name": "status",
2130+
"value_types": ["Int"]
2131+
}
2132+
]
2133+
}
2134+
}
2135+
},
2136+
"STOPTSTDADDR": {
2137+
"description": {
2138+
"short": "Stores a `MsgAddressInt` with tag `addr_std$10` or `Null` (stored as `addr_none$00`).",
2139+
"long": "Stores a `MsgAddressInt` with tag `addr_std$10` or a `Null` (stored as `addr_none$00`) from the stack into _Builder_ `b`, returning the updated builder `b'`. If the value is not `addr_std$10` or `Null`, throws an exception.",
2140+
"tags": ["address"],
2141+
"operands": [],
2142+
"exit_codes": [
2143+
{
2144+
"errno": "9",
2145+
"condition": "Cannot load a MsgAddressInt."
2146+
}
2147+
]
2148+
},
2149+
"signature": {
2150+
"inputs": {
2151+
"stack": [
2152+
{
2153+
"type": "simple",
2154+
"name": "addr",
2155+
"value_types": ["Slice", "Null"]
2156+
},
2157+
{
2158+
"type": "simple",
2159+
"name": "b",
2160+
"value_types": ["Builder"]
2161+
}
2162+
]
2163+
},
2164+
"outputs": {
2165+
"stack": [
2166+
{
2167+
"type": "simple",
2168+
"name": "b'",
2169+
"value_types": ["Builder"]
2170+
}
2171+
]
2172+
}
2173+
}
2174+
},
2175+
"STOPTSTDADDRQ": {
2176+
"description": {
2177+
"short": "Quietly stores a `MsgAddressInt` with tag `addr_std$10` or `Null` (stored as `addr_none$00`).",
2178+
"long": "Stores a `MsgAddressInt` with tag `addr_std$10` or a `Null` (stored as `addr_none$00`) from the stack into _Builder_ `b`, returning the updated builder `b'`. This is a quiet version of `STOPTSTDADDR` which means that instead of throwing an exception, it pushes a status flag to the stack: 0 if the operation succeeds, -1 if the operation fails.",
2179+
"tags": ["address"],
2180+
"operands": []
2181+
},
2182+
"signature": {
2183+
"inputs": {
2184+
"stack": [
2185+
{
2186+
"type": "simple",
2187+
"name": "addr",
2188+
"value_types": ["Slice", "Null"]
2189+
},
2190+
{
2191+
"type": "simple",
2192+
"name": "b",
2193+
"value_types": ["Builder"]
2194+
}
2195+
]
2196+
},
2197+
"outputs": {
2198+
"stack": [
2199+
{
2200+
"type": "simple",
2201+
"name": "b'",
2202+
"value_types": ["Builder"]
2203+
},
2204+
{
2205+
"type": "simple",
2206+
"name": "status",
2207+
"value_types": ["Int"]
2208+
}
2209+
]
2210+
}
2211+
}
2212+
},
18632213
"LDIX": {
18642214
"description": {
18652215
"short": "",

0 commit comments

Comments
 (0)