Explorar el Código

Update substrate links (#939)

All the links were broken.

Signed-off-by: Sean Young <sean@mess.org>
Sean Young hace 3 años
padre
commit
12f28e6b63
Se han modificado 9 ficheros con 11 adiciones y 11 borrados
  1. 1 1
      README.md
  2. 1 1
      docs/examples.rst
  3. 1 1
      docs/index.rst
  4. 1 1
      docs/language/builtins.rst
  5. 1 1
      docs/language/types.rst
  6. 1 1
      docs/running.rst
  7. 3 3
      docs/targets/substrate.rst
  8. 1 1
      src/lib.rs
  9. 1 1
      stdlib/substrate.c

+ 1 - 1
README.md

@@ -137,7 +137,7 @@ Alternatively if you want to use the solang container, run:
 docker run --rm -it -v $(pwd):/sources ghcr.io/hyperledger-labs/solang -v -o /sources --target substrate /sources/flipper.sol
 ```
 You will have a file called flipper.contract. You can use this directly in
-the [Polkadot UI](https://substrate.dev/substrate-contracts-workshop/#/0/deploy-contract),
+the [Contracts UI](https://contracts-ui.substrate.io/),
 as if your smart contract was written using ink!.
 
 ## Tentative roadmap

+ 1 - 1
docs/examples.rst

@@ -6,7 +6,7 @@ Here are two examples of Solidity contracts.
 Flipper
 -------
 
-This is the `ink! flipper example <https://substrate.dev/substrate-contracts-workshop/#/0/creating-an-ink-project>`_
+This is the `ink! flipper example <https://github.com/paritytech/ink/blob/v3.3.0/examples/flipper/lib.rs>`_
 written in Solidity:
 
 .. include:: ../examples/flipper.sol

+ 1 - 1
docs/index.rst

@@ -4,7 +4,7 @@ Solang Solidity Compiler
 Welcome to the Solang Solidity Compiler. Using Solang, you can compile smart contracts written in
 `Solidity <https://en.wikipedia.org/wiki/Solidity>`_ for
 `Solana <https://www.solana.com/>`_,
-`Parity Substrate <https://substrate.dev/>`_, and
+`Parity Substrate <https://substrate.io/>`_, and
 `Ethereum ewasm <https://github.com/ewasm/design>`_. It uses the
 `llvm <https://www.llvm.org/>`_ compiler framework to produce WebAssembly
 (wasm) or BPF contract code. As result, the output is highly optimized, which saves you in gas costs.

+ 1 - 1
docs/language/builtins.rst

@@ -261,7 +261,7 @@ ABI encoding and decoding
 _________________________
 
 The ABI encoding depends on the target being compiled for. Substrate uses the
-`SCALE Codec <https://substrate.dev/docs/en/knowledgebase/advanced/codec>`_ and ewasm uses
+`SCALE Codec <https://docs.substrate.io/reference/scale-codec/>`_ and ewasm uses
 `Ethereum ABI encoding <https://docs.soliditylang.org/en/v0.7.6/abi-spec.html>`_.
 
 abi.decode(bytes, (*type-list*))

+ 1 - 1
docs/language/types.rst

@@ -450,7 +450,7 @@ be reflected in the current function. For example:
   32 bytes. However, since ``bytes32`` is a primitive in itself, this will only be 32
   bytes when ABI encoded.
 
-  In Substrate, the `SCALE <https://substrate.dev/docs/en/knowledgebase/advanced/codec>`_
+  In Substrate, the `SCALE <https://docs.substrate.io/reference/scale-codec/>`_
   encoding uses 32 bytes for both types.
 
 Dynamic Length Arrays

+ 1 - 1
docs/running.rst

@@ -8,7 +8,7 @@ file (also known as the abi).
 
 The following targets are supported right now:
 `Solana <https://www.solana.com/>`_,
-`Parity Substrate <https://substrate.dev/>`_, and
+`Parity Substrate <https://substrate.io/>`_, and
 `Ethereum ewasm <https://github.com/ewasm/design>`_.
 
 

+ 3 - 3
docs/targets/substrate.rst

@@ -1,14 +1,14 @@
 Parity Substrate
 ================
 
-Solang works with Parity Substrate 3.0. Note that for recent Substrate Version, cross-contract calls as well as using `address` 
+Solang works with Parity Substrate 3.0. Note that for recent Substrate Version, cross-contract calls as well as using `address`
 type as function argument or return values are not supported. We are currently working on fixing any regressions.
 
 The Parity Substrate has the following differences to Ethereum Solidity:
 
 - The address type is 32 bytes, not 20 bytes. This is what Substrate calls an "account"
 - An address literal has to be specified using the ``address"5GBWmgdFAMqm8ZgAHGobqDqX6tjLxJhv53ygjNtaaAn3sjeZ"`` syntax
-- ABI encoding and decoding is done using the `SCALE <https://substrate.dev/docs/en/knowledgebase/advanced/codec>`_ encoding
+- ABI encoding and decoding is done using the `SCALE <https://docs.substrate.io/reference/scale-codec/>`_ encoding
 - Multiple constructors are allowed, and can be overloaded
 - There is no ``ecrecover()`` builtin function, or any other function to recover or verify cryptographic signatures at runtime
 - Only functions called via rpc may return values; when calling a function in a transaction, the return values cannot be accessed
@@ -24,4 +24,4 @@ directory. Write this to flipper.sol and run:
 
 Now you should have a file called ``flipper.contract``. The file contains both the ABI and contract wasm.
 It can be used directly in the
-`Polkadot UI <https://substrate.dev/substrate-contracts-workshop/#/0/deploy-contract>`_, as if the contract was written in ink!.
+`Contracts UI <https://contracts-ui.substrate.io/>`_, as if the contract was written in ink!.

+ 1 - 1
src/lib.rs

@@ -25,7 +25,7 @@ use std::{ffi::OsStr, fmt};
 pub enum Target {
     /// Solana, see <https://solana.com/>
     Solana,
-    /// Parity Substrate, see <https://substrate.dev/>
+    /// Parity Substrate, see <https://substrate.io/>
     Substrate {
         address_length: usize,
         value_length: usize,

+ 1 - 1
stdlib/substrate.c

@@ -4,7 +4,7 @@
 #include "stdlib.h"
 
 // 32 bit integer as as scale compact integer
-// https://substrate.dev/docs/en/knowledgebase/advanced/codec#compactgeneral-integers
+// https://docs.substrate.io/reference/scale-codec/#fn-1
 uint8_t *compact_encode_u32(uint8_t *dest, uint32_t val)
 {
     if (val < 64)