From 269261d21564f6a38ecd8efc61dd294e960e72e5 Mon Sep 17 00:00:00 2001
From: GitHub Action
__call
function.
This file has been moved here
+This file has been moved here
@@ -351,10 +351,10 @@The language offers some primitive functions to interact with the blockchain and contracts. -Please refer to the Chain, Contract -and the Call namespaces in the documentation.
+Please refer to the Chain, Contract +and the Call namespaces in the documentation.To call a function in another contract you need the address to an instance of the contract. The type of the address must be a contract type, which consists @@ -1087,8 +1087,8 @@ transaction still only uses up the gas spent running the contract.
Since the version 6.0.0 Sophia supports deploying contracts by other contracts. This can be done in two ways:
Chain.clone
Chain.create
Chain.clone
Chain.create
These functions take variable number of arguments that must match the created
contract's init
function. Beside that they take some additional named
@@ -1269,7 +1269,7 @@ the file, except that error messages will refer to the original source
locations. The language will try to include each file at most one time automatically,
so even cyclic includes should be working without any special tinkering.
Sophia offers standard library which exposes some +
Sophia offers standard library which exposes some
primitive operations and some higher level utilities. The builtin
namespaces like Chain
, Contract
, Map
are included by default and are supported internally by the compiler.
@@ -1500,7 +1500,7 @@ fails rather than wrapping around to -2²⁵⁵.
Sophia integers do not support bit arithmetic. Instead there is a separate
-type bits
. See the standard library documentation.
bits
. See the standard library documentation.
On the AEVM a bit field is represented by a 256-bit word and reading or writing
a bit outside the 0..255 range fails with an arithmetic_error
. On FATE a bit
field can be of arbitrary size (but it is still represented by the
@@ -1567,7 +1567,7 @@ Example syntax:
[1..4] == [1,2,3,4]
Please refer to the standard library for the predefined functionalities.
+Please refer to the standard library for the predefined functionalities.
A Sophia record type is given by a fixed set of fields with associated,
possibly different, types. For instance
@@ -1579,7 +1579,7 @@ possibly different, types. For instance
but of a fixed type. The type of maps with keys of type 'k
and values of type
'v
is written map('k, 'v)
. The key type can be any type that does not
contain a map or a function type.
Please refer to the standard library for the predefined functionalities.
+Please refer to the standard library for the predefined functionalities.
A value of record type is constructed by giving a value for each of the fields. For the example above, @@ -1631,19 +1631,19 @@ it.
Strings can be compared for equality (==
, !=
), used as keys in maps and
records, and used in builtin functions String.length
, String.concat
and
the hash functions described below.
-Please refer to the String
library documentation.
Please refer to the String
library documentation.
There is a builtin type char
(the underlying representation being an integer),
mainly used to manipulate strings via String.to_list
/String.from_list
.
Characters can also be introduced as character literals (`'x', '+', ...).
-Please refer to the Char
library documentation.
Please refer to the Char
library documentation.
Byte arrays are fixed size arrays of 8-bit integers. They are described in hexadecimal system,
for example the literal #cafe
creates a two-element array of bytes ca
(202) and fe
(254)
and thus is a value of type bytes(2)
.
Please refer to the Bytes
library documentation.
Please refer to the Bytes
library documentation.
Libraries Crypto and String provide functions to +
Libraries Crypto and String provide functions to
hash objects, verify signatures etc. The hash
is a type alias for bytes(32)
.
When a Generalized account is authorized, the authorization function needs
@@ -1656,7 +1656,7 @@ normal contract call they return None
.
For a full description of how Oracle works see Oracles. -For a functionality documentation refer to the standard library.
+For a functionality documentation refer to the standard library.Example for an oracle answering questions of type string
with answers of type int
:
contract Oracles =
@@ -1709,12 +1709,12 @@ For a functionality documentation refer to the Sanity checks
When an Oracle literal is passed to a contract, no deep checks are performed.
-For extra safety Oracle.check and Oracle.check_query
+For extra safety Oracle.check and Oracle.check_query
functions are provided.
AENS interface
Contracts can interact with the
æternity naming system.
-For this purpose the AENS library was exposed.
+For this purpose the AENS library was exposed.
Example
In this example we assume that the name name
already exists, and is owned by
an account with address addr
. In order to allow a contract ct
to handle
@@ -1840,7 +1840,7 @@ the signature data with the network_id
(ae_mainnet
for
-
+
@@ -1856,7 +1856,7 @@ the signature data with the network_id
(ae_mainnet
for
-
+
@@ -1891,10 +1891,10 @@ the signature data with the network_id
(ae_mainnet
for
-
+
-
+
diff --git a/master/sophia_stdlib.html b/master/sophia_stdlib/index.html
similarity index 97%
rename from master/sophia_stdlib.html
rename to master/sophia_stdlib/index.html
index 3d961bc..63d9bb9 100644
--- a/master/sophia_stdlib.html
+++ b/master/sophia_stdlib/index.html
@@ -9,8 +9,8 @@
-
-
+
+
@@ -18,10 +18,10 @@
-
+
-
+
@@ -55,7 +55,7 @@
-
+
@@ -76,7 +76,7 @@
-
+
@@ -191,7 +191,7 @@
-
+
@@ -223,7 +223,7 @@
-
+
Introduction
@@ -238,7 +238,7 @@
-
+
Syntax
@@ -253,7 +253,7 @@
-
+
Features
@@ -282,7 +282,7 @@
-
+
Standard library
@@ -523,7 +523,7 @@
-
+
Contract examples
@@ -538,7 +538,7 @@
-
+
Changelog
@@ -1016,7 +1016,7 @@ the pubkey
The acct
is the address of the oracle to register (can be the same as the contract).
signature
is a signature proving that the contract is allowed to register the account -
the network id
+ account address
+ contract address
(concatenated as byte arrays) is
- signed with the
+ signed with the
private key of the account, proving you have the private key of the oracle to be. If the
address is the same as the contract sign
is ignored and can be left out entirely.
The qfee
is the minimum query fee to be paid by a user when asking a question of the oracle.
@@ -1040,7 +1040,7 @@ the pubkey
Unless the contract address is the same as the oracle address the signature
(which is an optional, named argument)
needs to be provided. Proving that we have the private key of the oracle by
-signing
+signing
the network id
+ oracle query id
+ contract address
extend
Oracle.extend(<signature : bytes(64)>, o : oracle('a, 'b), ttl : Chain.ttl) : unit
@@ -1114,12 +1114,12 @@ For example:
preclaim
AENS.preclaim(owner : address, commitment_hash : hash, <signature : signature>) : unit
-The signature should be over
+
The signature should be over
network id
+ owner address
+ Contract.address
(concatenated as byte arrays).
claim
AENS.claim(owner : address, name : string, salt : int, name_fee : int, <signature : signature>) : unit
-The signature should be over
+
The signature should be over
network id
+ owner address
+ name_hash
+ Contract.address
(concatenated as byte arrays)
using the private key of the owner
account for signing.
@@ -1127,7 +1127,7 @@ using the private key of the owner
account for signing.
AENS.transfer(owner : address, new_owner : address, name : string, <signature : signature>) : unit
Transfers name to the new owner.
-The signature should be over
+
The signature should be over
network id
+ owner address
+ name_hash
+ Contract.address
(concatenated as byte arrays)
using the private key of the owner
account for signing.
@@ -1135,7 +1135,7 @@ using the private key of the owner
account for signing.
AENS.revoke(owner : address, name : string, <signature : signature>) : unit
Revokes the name to extend the ownership time.
-The signature should be over
+
The signature should be over
network id
+ owner address
+ name_hash
+ Contract.address
(concatenated as byte arrays)
using the private key of the owner
account for signing.
@@ -2220,7 +2220,7 @@ this function to verify the input.
-
+
@@ -2236,7 +2236,7 @@ this function to verify the input.
-
+
@@ -2271,10 +2271,10 @@ this function to verify the input.
-
+
-
+
diff --git a/master/sophia_syntax.html b/master/sophia_syntax/index.html
similarity index 95%
rename from master/sophia_syntax.html
rename to master/sophia_syntax/index.html
index a88d05d..0da62e6 100644
--- a/master/sophia_syntax.html
+++ b/master/sophia_syntax/index.html
@@ -9,8 +9,8 @@
-
-
+
+
@@ -18,10 +18,10 @@
-
+
-
+
@@ -55,7 +55,7 @@
-
+
@@ -76,7 +76,7 @@
-
+
@@ -191,7 +191,7 @@
-
+
@@ -223,7 +223,7 @@
-
+
Introduction
@@ -252,7 +252,7 @@
-
+
Syntax
@@ -376,7 +376,7 @@
-
+
Features
@@ -391,7 +391,7 @@
-
+
Standard library
@@ -406,7 +406,7 @@
-
+
Contract examples
@@ -421,7 +421,7 @@
-
+
Changelog
@@ -884,7 +884,7 @@ switch(f(x))
-
+
@@ -900,7 +900,7 @@ switch(f(x))
-
+
@@ -935,10 +935,10 @@ switch(f(x))
-
+
-
+