Skip to content

Commit

Permalink
Merge pull request #76 from alephium/Update-version-to-v0.2.2
Browse files Browse the repository at this point in the history
Update version to v0.2.2
  • Loading branch information
suyanlong authored Jan 31, 2023
2 parents 6ff2fe1 + f11103c commit 6d43580
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Ralph is the language used in alephium to create smart contracts, ralph-vscode i
### Command compile

```shell
java -jar ${home}/.alephium-dev/alephium-ralphc-*.jar -c ./contracts -a ./artifacts
cd tests && java -jar ${home}/.alephium-dev/alephium-ralphc-*.jar -c ./contracts -a ./artifacts
```

#### More command compile
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ralph-vscode",
"displayName": "ralph vscode",
"description": "ralph vscode",
"version": "0.2.1",
"version": "0.2.2",
"engines": {
"vscode": "^1.69.0",
"node": ">=v18.0.0"
Expand Down Expand Up @@ -68,12 +68,12 @@
"ralph.download.config.url": {
"type": "string",
"description": "download link",
"default": "https://github.com/alephium/alephium/releases/download/v1.6.2/alephium-ralphc-1.6.2.jar"
"default": "https://github.com/alephium/alephium/releases/download/v1.6.3/alephium-ralphc-1.6.3.jar"
},
"ralph.download.config.target": {
"type": "string",
"description": "compiler jar",
"default": "alephium-ralphc-1.6.2.jar"
"default": "alephium-ralphc-1.6.3.jar"
},
"ralph.compile.command": {
"type": "string",
Expand Down Expand Up @@ -104,7 +104,7 @@
"default": false,
"description": "ignore unused private functions warnings"
},
"ralph.compile.option.ignoreExternalCallCheckWarnings": {
"ralph.compile.option.ignoreCheckExternalCallerWarnings": {
"type": "boolean",
"default": false,
"description": "ignore external call check warnings"
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class Compiler {
warning += '--ip '
}

if (this.option?.ignoreExternalCallCheckWarnings) {
if (this.option?.ignoreCheckExternalCallerWarnings) {
warning += '--ie '
}

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CompileOption {

ignoreUnusedPrivateFunctionsWarnings = false

ignoreExternalCallCheckWarnings = false
ignoreCheckExternalCallerWarnings = false

warningsAsError = false

Expand Down
28 changes: 14 additions & 14 deletions src/provider/builtIn/ralph-built-in-functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,17 +441,17 @@
"name": "verifyAbsoluteLocktime",
"category": "Chain",
"signature": "fn verifyAbsoluteLocktime!(lockUntil:U256) -> ()",
"doc": "Verifies the absolute locktime with the block timestamp.",
"doc": "Verifies that the absolute locktime is before the block timestamp, otherwise it fails.",
"params": ["@param lockUntil the timestamp until which the lock is valid"],
"returns": "@returns true if the lock timestamp is before the block timestamp, false otherwise"
"returns": "@returns "
},
{
"name": "verifyRelativeLocktime",
"category": "Chain",
"signature": "fn verifyRelativeLocktime!(txInputIndex:U256, lockDuration:U256) -> ()",
"doc": "Verifies the relative locktime for transaction input.",
"doc": "Verifies that the input's creation timestamp + lock duration is before the block timestamp, otherwise it fails.",
"params": ["@param txInputIndex the index of the transaction input", "@param lockDuration the duration that the input is locked for"],
"returns": "@returns true if the input's creation timestamp + lock duration is before the block timestamp, false otherwise"
"returns": "@returns "
},
{
"name": "dustAmount",
Expand Down Expand Up @@ -513,39 +513,39 @@
"name": "u256To2Byte",
"category": "Conversion",
"signature": "fn u256To2Byte!(u256:U256) -> (ByteVec)",
"doc": "Converts U256 to 2 bytes.",
"doc": "Converts U256 to 2 big-endian bytes.",
"params": ["@param u256 the input U256"],
"returns": "@returns 2 bytes"
},
{
"name": "u256To4Byte",
"category": "Conversion",
"signature": "fn u256To4Byte!(u256:U256) -> (ByteVec)",
"doc": "Converts U256 to 4 bytes.",
"doc": "Converts U256 to 4 big-endian bytes.",
"params": ["@param u256 the input U256"],
"returns": "@returns 4 bytes"
},
{
"name": "u256To8Byte",
"category": "Conversion",
"signature": "fn u256To8Byte!(u256:U256) -> (ByteVec)",
"doc": "Converts U256 to 8 bytes.",
"doc": "Converts U256 to 8 big-endian bytes.",
"params": ["@param u256 the input U256"],
"returns": "@returns 8 bytes"
},
{
"name": "u256To16Byte",
"category": "Conversion",
"signature": "fn u256To16Byte!(u256:U256) -> (ByteVec)",
"doc": "Converts U256 to 16 bytes.",
"doc": "Converts U256 to 16 big-endian bytes.",
"params": ["@param u256 the input U256"],
"returns": "@returns 16 bytes"
},
{
"name": "u256To32Byte",
"category": "Conversion",
"signature": "fn u256To32Byte!(u256:U256) -> (ByteVec)",
"doc": "Converts U256 to 32 bytes.",
"doc": "Converts U256 to 32 big-endian bytes.",
"params": ["@param u256 the input U256"],
"returns": "@returns 32 bytes"
},
Expand All @@ -561,39 +561,39 @@
"name": "u256From2Byte",
"category": "Conversion",
"signature": "fn u256From2Byte!(bytes:ByteVec) -> (U256)",
"doc": "Converts 2 byte to U256.",
"doc": "Converts 2 big-endian bytes to U256.",
"params": ["@param bytes the input ByteVec"],
"returns": "@returns an U256"
},
{
"name": "u256From4Byte",
"category": "Conversion",
"signature": "fn u256From4Byte!(bytes:ByteVec) -> (U256)",
"doc": "Converts 4 byte to U256.",
"doc": "Converts 4 big-endian bytes to U256.",
"params": ["@param bytes the input ByteVec"],
"returns": "@returns an U256"
},
{
"name": "u256From8Byte",
"category": "Conversion",
"signature": "fn u256From8Byte!(bytes:ByteVec) -> (U256)",
"doc": "Converts 8 byte to U256.",
"doc": "Converts 8 big-endian bytes to U256.",
"params": ["@param bytes the input ByteVec"],
"returns": "@returns an U256"
},
{
"name": "u256From16Byte",
"category": "Conversion",
"signature": "fn u256From16Byte!(bytes:ByteVec) -> (U256)",
"doc": "Converts 16 byte to U256.",
"doc": "Converts 16 big-endian bytes to U256.",
"params": ["@param bytes the input ByteVec"],
"returns": "@returns an U256"
},
{
"name": "u256From32Byte",
"category": "Conversion",
"signature": "fn u256From32Byte!(bytes:ByteVec) -> (U256)",
"doc": "Converts 32 byte to U256.",
"doc": "Converts 32 big-endian bytes to U256.",
"params": ["@param bytes the input ByteVec"],
"returns": "@returns an U256"
},
Expand Down
2 changes: 1 addition & 1 deletion src/provider/completion/annotationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class AnnotationProvider extends Filter implements vscode.CompletionItemP

constructor() {
super()
this.annotationField = ['preapprovedAssets', 'assetsInContract', 'externalCallCheck', 'updateFields']
this.annotationField = ['preapprovedAssets', 'assetsInContract', 'checkExternalCaller', 'updateFields']
}

provideCompletionItems(
Expand Down
4 changes: 2 additions & 2 deletions tests/artifacts/.project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ignoreUnusedFieldsWarnings": false,
"ignoreUnusedPrivateFunctionsWarnings": false,
"ignoreUpdateFieldsCheckWarnings": false,
"ignoreExternalCallCheckWarnings": false
"ignoreCheckExternalCallerWarnings": false
},
"infos": {
"Add": {
Expand Down Expand Up @@ -64,7 +64,7 @@
},
"Sub": {
"sourceFile": "sub/sub.ral",
"sourceCodeHash": "409518aa25bdace56cefe167d6607f04cd955204a7050f00a050466703cdf0f0",
"sourceCodeHash": "c47faef24d632e854aa18e226b58b52dc56150a8464f4afc65111e8113c9f0ab",
"bytecodeDebugPatch": "",
"codeHashDebug": "513645f5c95a28d55a51070f3d5c51edbda05a98f46b23cad59952e2ee4846a1",
"warnings": [
Expand Down
2 changes: 1 addition & 1 deletion tests/artifacts/add/add.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.6.0",
"version": "v1.6.3",
"name": "Add",
"bytecode": "02020d40300100020402041600160100010200000202021205160016015fa00116002a16012aa101a001160016010e0da000010002",
"codeHash": "a20cffb6f8f9416decd7aec0375b12e04475e8cf19ba80775f8f2d7633e2556d",
Expand Down
2 changes: 1 addition & 1 deletion tests/artifacts/greeter/greeter.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.6.0",
"version": "v1.6.3",
"name": "Greeter",
"bytecode": "01010c010000000105030c7ba00002",
"codeHash": "23a48462286d2c2ffc6d3a19192060dd42c178e7d331819e75e059c5be3c042f",
Expand Down
2 changes: 1 addition & 1 deletion tests/artifacts/greeter_main.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.6.0",
"version": "v1.6.3",
"name": "GreeterMain",
"bytecodeTemplate": "01010300020014{0}17000c0d160001000d2f0c7b{0}17010c0d160101000d2f0c7b",
"fieldsSig": {
Expand Down
2 changes: 1 addition & 1 deletion tests/artifacts/main.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.6.0",
"version": "v1.6.3",
"name": "Main",
"bytecodeTemplate": "0101030001000a{0}17000e0d0e0e160001001818",
"fieldsSig": {
Expand Down
2 changes: 1 addition & 1 deletion tests/artifacts/sub/sub.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.6.0",
"version": "v1.6.3",
"name": "Sub",
"bytecode": "01011901000202010c05160016015fa00016002a16012ba100a00002",
"codeHash": "513645f5c95a28d55a51070f3d5c51edbda05a98f46b23cad59952e2ee4846a1",
Expand Down
2 changes: 1 addition & 1 deletion tests/artifacts/test/metadata.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.6.0",
"version": "v1.6.3",
"name": "MetaData",
"bytecode": "00010700000000000102",
"codeHash": "6d760b29e9479d910e22b9bc953d2f27a4b9205fbe5ab6a4c83b1261d593b6ae",
Expand Down
2 changes: 1 addition & 1 deletion tests/artifacts/test/warnings.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.6.0",
"version": "v1.6.3",
"name": "Warnings",
"bytecode": "02010701000202000102",
"codeHash": "9a0c90d67d729a478062d6794cf7b75c27483c50f6fe2ad13c5ed8873ad1fde2",
Expand Down
2 changes: 1 addition & 1 deletion tests/contracts/sub/sub.ral
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Contract Sub(mut result : U256) {
event Sub(x: U256, y: U256)

@using(externalCallCheck = false)
@using(checkExternalCaller = false)
pub fn sub(array: [U256; 2]) -> U256 {
emit Sub(array[0], array[1])
result = result + array[0] - array[1]
Expand Down

0 comments on commit 6d43580

Please sign in to comment.