Skip to content

Commit

Permalink
Merge pull request #78 from alephium/Update-version-to-v0.2.4
Browse files Browse the repository at this point in the history
Update dep
  • Loading branch information
suyanlong authored Feb 22, 2023
2 parents b2ce3f0 + ca212c7 commit 0207701
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 30 deletions.
6 changes: 3 additions & 3 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.3",
"version": "0.2.4",
"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.4/alephium-ralphc-1.6.4.jar"
"default": "https://github.com/alephium/alephium/releases/download/v1.7.1/alephium-ralphc-1.7.1.jar"
},
"ralph.download.config.target": {
"type": "string",
"description": "compiler jar",
"default": "alephium-ralphc-1.6.4.jar"
"default": "alephium-ralphc-1.7.1.jar"
},
"ralph.compile.command": {
"type": "string",
Expand Down
89 changes: 62 additions & 27 deletions src/provider/builtIn/ralph-built-in-functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,24 @@
{
"name": "createContract",
"category": "Contract",
"signature": "fn createContract!(bytecode:ByteVec, encodedFields:ByteVec) -> (ByteVec)",
"signature": "fn createContract!(bytecode:ByteVec, encodedImmFields:ByteVec, encodedMutFields:ByteVec) -> (ByteVec)",
"doc": "Creates a new contract without token issuance.",
"params": ["@param bytecode the bytecode of the contract to be created", "@param encodedFields the encoded fields as a ByteVec"],
"params": [
"@param bytecode the bytecode of the contract to be created",
"@param encodedImmFields the encoded immutable fields as a ByteVec",
"@param encodedMutFields the encoded mutable fields as a ByteVec"
],
"returns": "@returns the id of the created contract"
},
{
"name": "createContractWithToken",
"category": "Contract",
"signature": "fn createContractWithToken!(bytecode:ByteVec, encodedFields:ByteVec, issueTokenAmount:U256, issueTo?:Address) -> (ByteVec)",
"signature": "fn createContractWithToken!(bytecode:ByteVec, encodedImmFields:ByteVec, encodedMutFields:ByteVec, issueTokenAmount:U256, issueTo?:Address) -> (ByteVec)",
"doc": "Creates a new contract with token issuance.",
"params": [
"@param bytecode the bytecode of the contract to be created",
"@param encodedFields the encoded fields as a ByteVec",
"@param encodedImmFields the encoded immutable fields as a ByteVec",
"@param encodedMutFields the encoded mutable fields as a ByteVec",
"@param issueTokenAmount the amount of token to be issued",
"@param issueTo (optional) a designated address to receive issued token"
],
Expand All @@ -23,19 +28,24 @@
{
"name": "copyCreateContract",
"category": "Contract",
"signature": "fn copyCreateContract!(contractId:ByteVec, encodedFields:ByteVec) -> (ByteVec)",
"signature": "fn copyCreateContract!(contractId:ByteVec, encodedImmFields:ByteVec, encodedMutFields:ByteVec) -> (ByteVec)",
"doc": "Creates a new contract without token issuance by copying another contract's code. This costs less gas than createContract!(...).",
"params": ["@param contractId the id of the contract to be copied", "@param encodedFields the encoded fields as a ByteVec"],
"params": [
"@param contractId the id of the contract to be copied",
"@param encodedImmFields the encoded immutable fields as a ByteVec",
"@param encodedMutFields the encoded mutable fields as a ByteVec"
],
"returns": "@returns the id of the created contract"
},
{
"name": "copyCreateContractWithToken",
"category": "Contract",
"signature": "fn copyCreateContractWithToken!(contractId:ByteVec, encodedFields:ByteVec, issueTokenAmount:U256, issueTo?:Address) -> (ByteVec)",
"signature": "fn copyCreateContractWithToken!(contractId:ByteVec, encodedImmFields:ByteVec, encodedMutFields:ByteVec, issueTokenAmount:U256, issueTo?:Address) -> (ByteVec)",
"doc": "Creates a new contract with token issuance by copying another contract's code. This costs less gas than createContractWithToken!(...).",
"params": [
"@param contractId the id of the contract to be copied",
"@param encodedFields the encoded fields as a ByteVec",
"@param encodedImmFields the encoded immutable fields as a ByteVec",
"@param encodedMutFields the encoded mutable fields as a ByteVec",
"@param issueTokenAmount the amount of token to be issued",
"@param issueTo (optional) a designated address to receive issued token"
],
Expand Down Expand Up @@ -140,11 +150,12 @@
{
"name": "migrateWithFields",
"category": "Contract",
"signature": "fn migrateWithFields!(newBytecode:ByteVec, newEncodedFields:ByteVec) -> ()",
"signature": "fn migrateWithFields!(newBytecode:ByteVec, newEncodedImmFields:ByteVec, newEncodedMutFields:ByteVec) -> ()",
"doc": "Migrates both the code and the fields of the contract.",
"params": [
"@param newBytecode the bytecode for the contract to migrate to",
"@param newEncodedFields the new fields for the contract to migrate to"
"@param newEncodedImmFields the encoded immutable fields for the contract to migrate to",
"@param newEncodedMutFields the encoded mutable fields for the contract to migrate to"
],
"returns": "@returns "
},
Expand All @@ -159,24 +170,26 @@
{
"name": "createSubContract",
"category": "SubContract",
"signature": "fn createSubContract!(subContractPath:ByteVec, bytecode:ByteVec, encodedFields:ByteVec) -> (ByteVec)",
"signature": "fn createSubContract!(subContractPath:ByteVec, bytecode:ByteVec, encodedImmFields:ByteVec, encodedMutFields:ByteVec) -> (ByteVec)",
"doc": "Creates a new sub-contract without token issuance.",
"params": [
"@param subContractPath the path of the sub-contract to be created",
"@param bytecode the bytecode of the sub-contract to be created",
"@param encodedFields the encoded fields as a ByteVec"
"@param encodedImmFields the encoded immutable fields as a ByteVec",
"@param encodedMutFields the encoded mutable fields as a ByteVec"
],
"returns": "@returns the id of the created contract"
},
{
"name": "createSubContractWithToken",
"category": "SubContract",
"signature": "fn createSubContractWithToken!(subContractPath:ByteVec, bytecode:ByteVec, encodedFields:ByteVec, issueTokenAmount:U256, issueTo?:Address) -> (ByteVec)",
"signature": "fn createSubContractWithToken!(subContractPath:ByteVec, bytecode:ByteVec, encodedImmFields:ByteVec, encodedMutFields:ByteVec, issueTokenAmount:U256, issueTo?:Address) -> (ByteVec)",
"doc": "Creates a new sub-contract with token issuance.",
"params": [
"@param subContractPath the path of the sub-contract to be created",
"@param bytecode the bytecode of the sub-contract to be created",
"@param encodedFields the encoded fields as a ByteVec",
"@param encodedImmFields the encoded immutable fields as a ByteVec",
"@param encodedMutFields the encoded mutable fields as a ByteVec",
"@param issueTokenAmount the amount of token to be issued",
"@param issueTo (optional) a designated address to receive issued token"
],
Expand All @@ -185,24 +198,26 @@
{
"name": "copyCreateSubContract",
"category": "SubContract",
"signature": "fn copyCreateSubContract!(subContractPath:ByteVec, contractId:ByteVec, encodedFields:ByteVec) -> (ByteVec)",
"signature": "fn copyCreateSubContract!(subContractPath:ByteVec, contractId:ByteVec, encodedImmFields:ByteVec, encodedMutFields:ByteVec) -> (ByteVec)",
"doc": "Creates a new sub-contract without token issuance by copying another contract's code. This costs less gas than createSubContract!(...).",
"params": [
"@param subContractPath the path of the sub-contract to be created",
"@param contractId the id of the contract to be copied",
"@param encodedFields the encoded fields as a ByteVec"
"@param encodedImmFields the encoded immutable fields as a ByteVec",
"@param encodedMutFields the encoded mutable fields as a ByteVec"
],
"returns": "@returns the id of the created contract"
},
{
"name": "copyCreateSubContractWithToken",
"category": "SubContract",
"signature": "fn copyCreateSubContractWithToken!(subContractPath:ByteVec, contractId:ByteVec, encodedFields:ByteVec, issueTokenAmount:U256, issueTo?:Address) -> (ByteVec)",
"signature": "fn copyCreateSubContractWithToken!(subContractPath:ByteVec, contractId:ByteVec, encodedImmFields:ByteVec, encodedMutFields:ByteVec, issueTokenAmount:U256, issueTo?:Address) -> (ByteVec)",
"doc": "Creates a new sub-contract with token issuance by copying another contract's code. This costs less gas than createSubContractWithToken!(...).",
"params": [
"@param subContractPath the path of the sub-contract to be created",
"@param contractId the id of the contract to be copied",
"@param encodedFields the encoded fields as a ByteVec",
"@param encodedImmFields the encoded immutable fields as a ByteVec",
"@param encodedMutFields the encoded mutable fields as a ByteVec",
"@param issueTokenAmount the amount of token to be issued",
"@param issueTo (optional) a designated address to receive issued token"
],
Expand Down Expand Up @@ -621,7 +636,7 @@
"name": "encodeToByteVec",
"category": "ByteVec",
"signature": "fn encodeToByteVec!(...any) -> (ByteVec)",
"doc": "Encodes inputs as ByteVec.",
"doc": "Encodes inputs as big-endian ByteVec.",
"params": ["@param any a sequence of input values"],
"returns": "@returns a ByteVec encoding the inputs"
},
Expand Down Expand Up @@ -661,19 +676,27 @@
"name": "verifyTxSignature",
"category": "Cryptography",
"signature": "fn verifyTxSignature!(publicKey:ByteVec) -> ()",
"doc": "Verifies the transaction signature of a public key. The signature is signed against the transaction id.",
"params": ["@param publicKey the public key of the signer"],
"doc": "Verifies the transaction SecP256K1 signature of a public key. The signature is signed against the transaction id.",
"params": ["@param publicKey the public key (33 bytes) of the signer"],
"returns": "@returns true if the signature is valid, false otherwise"
},
{
"name": "getSegregatedSignature",
"category": "Cryptography",
"signature": "fn getSegregatedSignature!() -> (ByteVec)",
"doc": "The segregated signature of the transaction",
"params": [],
"returns": "@returns the segregated signature of the transaction"
},
{
"name": "verifySecP256K1",
"category": "Cryptography",
"signature": "fn verifySecP256K1!(data:ByteVec, publicKey:ByteVec, signature:ByteVec) -> ()",
"doc": "Verifies the SecP256K1 signature of the input and public key.",
"params": [
"@param data the data that was supposed to have been signed",
"@param publicKey the public key of the signer",
"@param signature the signature value"
"@param data the data (32 bytes) that was supposed to have been signed",
"@param publicKey the public key (33 bytes) of the signer",
"@param signature the signature (64 bytes) value"
],
"returns": "@returns true if the signature is valid, false otherwise"
},
Expand All @@ -683,9 +706,21 @@
"signature": "fn verifyED25519!(data:ByteVec, publicKey:ByteVec, signature:ByteVec) -> ()",
"doc": "Verifies the ED25519 signature of the input and public key.",
"params": [
"@param data the data that was supposed to have been signed",
"@param publicKey the public key of the signer",
"@param signature the signature value"
"@param data the data (32 bytes) that was supposed to have been signed",
"@param publicKey the public key (32 bytes) of the signer",
"@param signature the signature value (64 bytes)"
],
"returns": "@returns true if the signature is valid, false otherwise"
},
{
"name": "verifyBIP340Schnorr",
"category": "Cryptography",
"signature": "fn verifyBIP340Schnorr!(data:ByteVec, publicKey:ByteVec, signature:ByteVec) -> ()",
"doc": "Verifies the BIP340 Schnorr signature of the input and public key.",
"params": [
"@param data the data (32 bytes) that was supposed to have been signed",
"@param publicKey the public key (32 bytes) of the signer",
"@param signature the signature value (64 bytes)"
],
"returns": "@returns true if the signature is valid, false otherwise"
},
Expand Down

0 comments on commit 0207701

Please sign in to comment.