Browse Source

Rename Substrate to Polkadot (#1414)

Cyrill Leutwiler 2 years ago
parent
commit
c9e7abfb38
100 changed files with 129 additions and 132 deletions
  1. 1 1
      .github/ISSUE_TEMPLATE/bug_report.md
  2. 13 13
      .github/workflows/test.yml
  3. 2 2
      .gitmodules
  4. 2 2
      CODEOWNERS
  5. 1 1
      Cargo.toml
  6. 9 8
      README.md
  7. 2 2
      docs/code_gen_options.rst
  8. 1 1
      docs/contributing.rst
  9. 1 1
      docs/examples.rst
  10. 1 1
      docs/examples/polkadot/call_chain_extension.sol
  11. 0 0
      docs/examples/polkadot/call_flags.sol
  12. 0 0
      docs/examples/polkadot/constructor_named.sol
  13. 0 0
      docs/examples/polkadot/contract_gas_limit.sol
  14. 0 0
      docs/examples/polkadot/contract_new.sol
  15. 0 0
      docs/examples/polkadot/contract_payable.sol
  16. 0 0
      docs/examples/polkadot/contract_type.sol
  17. 0 0
      docs/examples/polkadot/function_call_external_gas.sol
  18. 0 0
      docs/examples/polkadot/function_fallback_and_receive.sol
  19. 0 0
      docs/examples/polkadot/function_modifier.sol
  20. 0 0
      docs/examples/polkadot/function_multiple_modifiers.sol
  21. 0 0
      docs/examples/polkadot/function_override_modifiers.sol
  22. 0 0
      docs/examples/polkadot/function_selector_override.sol
  23. 1 1
      docs/examples/polkadot/hash_type.sol
  24. 0 0
      docs/examples/polkadot/interface.sol
  25. 0 0
      docs/examples/polkadot/statement_try_catch_call.sol
  26. 0 0
      docs/examples/polkadot/statement_try_catch_constructor.sol
  27. 0 0
      docs/examples/polkadot/statement_try_catch_no_error_handling.sol
  28. 2 2
      docs/extension.rst
  29. 2 2
      docs/index.rst
  30. 21 21
      docs/language/builtins.rst
  31. 7 7
      docs/language/contracts.rst
  32. 1 1
      docs/language/events.rst
  33. 1 1
      docs/language/expressions.rst
  34. 15 15
      docs/language/functions.rst
  35. 1 1
      docs/language/interface_libraries.rst
  36. 4 4
      docs/language/introduction.rst
  37. 2 2
      docs/language/managing_values.rst
  38. 3 3
      docs/language/statements.rst
  39. 7 8
      docs/language/types.rst
  40. 9 9
      docs/running.rst
  41. 12 15
      docs/targets/polkadot.rst
  42. 2 2
      docs/testing.rst
  43. 1 1
      docs/yul_language/builtins.rst
  44. 0 0
      examples/polkadot/ballot.sol
  45. 0 0
      examples/polkadot/flipper.sol
  46. 1 1
      examples/polkadot/substrate_config.toml
  47. 1 1
      examples/solana/solana_config.toml
  48. 0 0
      integration/polkadot/.gitignore
  49. 0 0
      integration/polkadot/ConstructorDispatch.sol
  50. 0 0
      integration/polkadot/UniswapV2ERC20.sol
  51. 0 0
      integration/polkadot/UniswapV2ERC20.spec.ts
  52. 0 0
      integration/polkadot/UniswapV2Factory.sol
  53. 0 0
      integration/polkadot/UniswapV2Factory.spec.ts
  54. 0 0
      integration/polkadot/UniswapV2Pair.sol
  55. 0 0
      integration/polkadot/UniswapV2Pair.spec.ts
  56. 0 0
      integration/polkadot/UpgradeableProxy.sol
  57. 0 0
      integration/polkadot/array_struct_mapping_storage.sol
  58. 0 0
      integration/polkadot/array_struct_mapping_storage.spec.ts
  59. 0 0
      integration/polkadot/arrays.sol
  60. 0 0
      integration/polkadot/arrays.spec.ts
  61. 0 0
      integration/polkadot/asserts.sol
  62. 0 0
      integration/polkadot/asserts.spec.ts
  63. 0 0
      integration/polkadot/balances.sol
  64. 0 0
      integration/polkadot/balances.spec.ts
  65. 2 2
      integration/polkadot/build.sh
  66. 0 0
      integration/polkadot/builtins.sol
  67. 0 0
      integration/polkadot/builtins.spec.ts
  68. 0 0
      integration/polkadot/builtins2.sol
  69. 0 0
      integration/polkadot/builtins2.spec.ts
  70. 0 0
      integration/polkadot/call_flags.sol
  71. 0 0
      integration/polkadot/call_flags.spec.ts
  72. 1 1
      integration/polkadot/chain_extension.sol
  73. 0 0
      integration/polkadot/chain_extension.spec.ts
  74. 0 0
      integration/polkadot/constructor_dispatch.spec.ts
  75. 0 0
      integration/polkadot/create_contract.sol
  76. 0 0
      integration/polkadot/create_contract.spec.ts
  77. 0 0
      integration/polkadot/createpair.sol
  78. 0 0
      integration/polkadot/debug_buffer_format.sol
  79. 0 0
      integration/polkadot/debug_buffer_format.spec.ts
  80. 0 0
      integration/polkadot/delegate_call.sol
  81. 0 0
      integration/polkadot/delegate_call.spec.ts
  82. 0 0
      integration/polkadot/destruct.sol
  83. 0 0
      integration/polkadot/destruct.spec.ts
  84. 0 0
      integration/polkadot/events.sol
  85. 0 0
      integration/polkadot/events.spec.ts
  86. 0 0
      integration/polkadot/external_call.sol
  87. 0 0
      integration/polkadot/external_call.spec.ts
  88. 0 0
      integration/polkadot/flipper.sol
  89. 0 0
      integration/polkadot/flipper.spec.ts
  90. 0 0
      integration/polkadot/index.ts
  91. 0 0
      integration/polkadot/ink/caller/.gitignore
  92. 0 0
      integration/polkadot/ink/caller/Cargo.toml
  93. 0 0
      integration/polkadot/ink/caller/lib.rs
  94. 0 0
      integration/polkadot/ink_cross_calls.spec.ts
  95. 0 0
      integration/polkadot/inkee.sol
  96. 0 0
      integration/polkadot/interfaces/IERC20.sol
  97. 0 0
      integration/polkadot/interfaces/IUniswapV2Callee.sol
  98. 0 0
      integration/polkadot/interfaces/IUniswapV2ERC20.sol
  99. 0 0
      integration/polkadot/interfaces/IUniswapV2Factory.sol
  100. 0 0
      integration/polkadot/interfaces/IUniswapV2Pair.sol

+ 1 - 1
.github/ISSUE_TEMPLATE/bug_report.md

@@ -12,7 +12,7 @@ A clear and concise description of what the bug is.
 
 **To Reproduce**
 Steps to reproduce the behavior:
-1. What ledger are you using, e.g. Solana or Substrate
+1. What ledger are you using, e.g. Solana or Polkadot
 2. Provide both Solidity source and client code (e.g. TypeScript)
 3. Provide Solang version number (output of `solang --version`)
 3. What behavior are you seeing?

+ 13 - 13
.github/workflows/test.yml

@@ -226,7 +226,7 @@ jobs:
           --provenance=false \
           --tag ghcr.io/${GITHUB_REPOSITORY}:latest \
           --platform linux/arm64,linux/amd64 \
-          --label org.opencontainers.image.description="Solidity Compiler for Solana and Substrate version $(git describe --tags)"
+          --label org.opencontainers.image.description="Solidity Compiler for Solana and Polkadot version $(git describe --tags)"
 
   anchor:
     name: Anchor Integration test
@@ -309,8 +309,8 @@ jobs:
       run: npm run test
       working-directory: ./integration/solana
 
-  substrate:
-    name: Substrate Integration test
+  polkadot:
+    name: Polkadot Integration test
     runs-on: solang-ubuntu-latest
     needs: linux-x86-64
     steps:
@@ -318,9 +318,9 @@ jobs:
       uses: actions/checkout@v3
       with:
         submodules: recursive
-      # We can't run substrate as a github actions service, since it requires
+      # We can't run substrate node as a github actions service, since it requires
       # command line arguments. See https://github.com/actions/runner/pull/1152
-    - name: Start substrate
+    - name: Start substrate contracts node
       run: echo id=$(docker run -d -p 9944:9944 ghcr.io/hyperledger/solang-substrate-ci:e41a9c0 substrate-contracts-node --dev --ws-external) >> $GITHUB_OUTPUT
       id: substrate
     - uses: actions/setup-node@v3
@@ -334,28 +334,28 @@ jobs:
         chmod 755 ./bin/solang
         echo "$(pwd)/bin" >> $GITHUB_PATH
     - run: npm install
-      working-directory: ./integration/substrate
+      working-directory: ./integration/polkadot
     - name: Build ink! contracts
       run: npm run build-ink
-      working-directory: ./integration/substrate
+      working-directory: ./integration/polkadot
     - name: Build Solang contracts
       run: npm run build
-      working-directory: ./integration/substrate
+      working-directory: ./integration/polkadot
     - name: Deploy and test contracts
       run: npm run test
-      working-directory: ./integration/substrate
+      working-directory: ./integration/polkadot
     - name: cleanup
       if: always()
       run: docker kill ${{steps.substrate.outputs.id}}
 
-  substrate-subxt:
-    name: Substrate Integration test with subxt
+  polkadot-subxt:
+    name: Polkadot Integration test with subxt
     runs-on: ubuntu-22.04
     needs: linux-x86-64
     steps:
     - name: Checkout sources
       uses: actions/checkout@v2
-      # We can't run substrate as a github actions service, since it requires
+      # We can't run substrate node as a github actions service, since it requires
       # command line arguments. See https://github.com/actions/runner/pull/1152
     - name: Start substrate
       run: echo id=$(docker run -d -p 9944:9944 ghcr.io/hyperledger/solang-substrate-ci:e41a9c0 substrate-contracts-node --dev --ws-external) >> $GITHUB_OUTPUT
@@ -373,7 +373,7 @@ jobs:
         toolchain: stable
         default: true
         override: true
-    - run: 'parallel solang compile -v --target substrate --release -o ./contracts/ ::: ../substrate/*.sol ../substrate/test/*.sol'
+    - run: 'parallel solang compile -v --target polkadot --release -o ./contracts/ ::: ../polkadot/*.sol ../polkadot/test/*.sol'
       working-directory: ./integration/subxt-tests
     - name: Deploy and test contracts
       run: cargo test -- --test-threads=1

+ 2 - 2
.gitmodules

@@ -1,6 +1,6 @@
 [submodule "solang-parser/testdata/solidity"]
 	path = testdata/solidity
 	url = https://github.com/ethereum/solidity
-[submodule "integration/substrate/tornado/tornado-cli"]
-	path = integration/substrate/tornado/tornado-cli
+[submodule "integration/polkadot/tornado/tornado-cli"]
+	path = integration/polkadot/tornado/tornado-cli
 	url = https://github.com/tornadocash/tornado-cli.git

+ 2 - 2
CODEOWNERS

@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: Apache-2.0
 
 * @seanyoung @xermicus @LucasSte
-src/emit/substrate/ @xermicus
+src/emit/polkadot/ @xermicus
 src/emit/solana/ @LucasSte @seanyoung
-integration/substrate/ @xermicus
+integration/polkadot/ @xermicus
 integration/subxt-tests/ @xermicus
 integration/solana/ @LucasSte @seanyoung
 integration/anchor/ @LucasSte @seanyoung

+ 1 - 1
Cargo.toml

@@ -7,7 +7,7 @@ documentation = "https://solang.readthedocs.io/"
 license = "Apache-2.0"
 build = "build.rs"
 description = "Solang Solidity Compiler"
-keywords = [ "solidity", "compiler", "solana", "substrate" ]
+keywords = [ "solidity", "compiler", "solana", "polkadot", "substrate" ]
 rust-version = "1.68.0"
 edition = "2021"
 exclude = [ "/.*", "/docs",  "/examples", "/solana-library", "/tests", "/integration", "/vscode", "/testdata" ]

+ 9 - 8
README.md

@@ -1,6 +1,6 @@
 <img src="https://raw.githubusercontent.com/hyperledger/solang/main/docs/hl_solang_horizontal-color.svg" alt="Solang Logo" width="75%"/>
 
-# solang - Solidity Compiler for Solana and Substrate
+# solang - Solidity Compiler for Solana and Polkadot
 
 [![Discord](https://img.shields.io/discord/905194001349627914?logo=Hyperledger&style=plastic)](https://discord.gg/hyperledger)
 [![CI](https://github.com/hyperledger/solang/workflows/test/badge.svg)](https://github.com/hyperledger/solang/actions)
@@ -10,8 +10,9 @@
 
 Welcome to Solang, a new Solidity compiler written in rust which uses
 llvm as the compiler backend. Solang can compile Solidity for Solana and
-Substrate. Solang is source compatible with Solidity 0.8, with
-some caveats due to differences in the underlying blockchain.
+Polkadot Parachains with the `contracts` pallet.
+Solang is source compatible with Solidity 0.8, 
+with some caveats due to differences in the underlying blockchain.
 
 Solang is under active development right now, and has
 [extensive documentation](https://solang.readthedocs.io/en/latest/).
@@ -109,18 +110,18 @@ export ANCHOR_PROVIDER_URL=http://127.0.0.1:8899
 node flipper.js
 ```
 
-### Build for Substrate
+### Build for Polkadot
 
 Run the following command, selecting the flipper example available on Solang's repository:
 
 ```bash
-solang compile --target substrate examples/substrate/flipper.sol
+solang compile --target polkadot examples/polkadot/flipper.sol
 ```
 
 Alternatively if you want to use the solang container, run:
 
 ```
-docker run --rm -it -v $(pwd):/sources ghcr.io/hyperledger/solang compile -v -o /sources --target substrate /sources/flipper.sol
+docker run --rm -it -v $(pwd):/sources ghcr.io/hyperledger/solang compile -v -o /sources --target polkadot /sources/flipper.sol
 ```
 You will have a file called flipper.contract. You can use this directly in
 the [Contracts UI](https://contracts-ui.substrate.io/),
@@ -139,8 +140,8 @@ Here is a brief description of what we envision for the next versions.
 |----------------------------------------------------|-------------|
 | Improve management over optimization passes        | Not started |
 | Adopt single static assignment for code generation | In progress |
-| Support openzeppelin on Substrate target           | In progress |
-| Provide Solidity -> Substrate porting guide        | Not started |
+| Support openzeppelin on Polkadot target            | In progress |
+| Provide Solidity -> Polkadot porting guide         | Not started |
 | Call Solidity from Solana's Rust contracts         | Not started |
 | Tooling for calls between ink! <> solidity         | In progress |
 | Provide CLI for node interactions                  | In progress |

+ 2 - 2
docs/code_gen_options.rst

@@ -148,7 +148,7 @@ as a function argument, for instance, the length is unknown.
 ``wasm-opt`` optimization passes
 --------------------------------
 
-For the Substrate target, optimization passes from the `binaryen <https://github.com/WebAssembly/binaryen>`_ ``wasm-opt`` 
+For the Polkadot target, optimization passes from the `binaryen <https://github.com/WebAssembly/binaryen>`_ ``wasm-opt`` 
 tool can be applied. This may shrink the Wasm code size and makes it more efficient.
 
 Use the ``--wasm-opt`` compile flag to enable ``wasm-opt`` optimizations. Possible values are 
@@ -190,7 +190,7 @@ The contract will print the return code of runtime calls by default, and this fe
 
 .. note::
 
-    This is only implemented for the Substrate target.
+    This is only implemented for the Polkadot target.
 
 
 .. _no-log-runtime-errors:

+ 1 - 1
docs/contributing.rst

@@ -34,7 +34,7 @@ Prior to opening a pull request for your branch, make sure that the code in your
 Target Specific
 ---------------
 
-Solang supports Substrate and Solana. These targets need testing
+Solang supports Polkadot and Solana. These targets need testing
 via integration tests. New targets like
 `Fabric <https://github.com/hyperledger/fabric-chaincode-wasm>`_ need to be
 added, and tests added.

+ 1 - 1
docs/examples.rst

@@ -13,7 +13,7 @@ _______
 This is the `ink! flipper example <https://github.com/paritytech/ink/blob/v3.3.0/examples/flipper/lib.rs>`_
 written in Solidity:
 
-.. include:: ../examples/substrate/flipper.sol
+.. include:: ../examples/polkadot/flipper.sol
   :code: solidity
 
 Example

+ 1 - 1
docs/examples/substrate/call_chain_extension.sol → docs/examples/polkadot/call_chain_extension.sol

@@ -1,4 +1,4 @@
-import "substrate";
+import "polkadot";
 
 contract Foo {
     // Call the "rand-extension" example chain extension demonstrated here:

+ 0 - 0
docs/examples/substrate/call_flags.sol → docs/examples/polkadot/call_flags.sol


+ 0 - 0
docs/examples/substrate/constructor_named.sol → docs/examples/polkadot/constructor_named.sol


+ 0 - 0
docs/examples/substrate/contract_gas_limit.sol → docs/examples/polkadot/contract_gas_limit.sol


+ 0 - 0
docs/examples/substrate/contract_new.sol → docs/examples/polkadot/contract_new.sol


+ 0 - 0
docs/examples/substrate/contract_payable.sol → docs/examples/polkadot/contract_payable.sol


+ 0 - 0
docs/examples/substrate/contract_type.sol → docs/examples/polkadot/contract_type.sol


+ 0 - 0
docs/examples/substrate/function_call_external_gas.sol → docs/examples/polkadot/function_call_external_gas.sol


+ 0 - 0
docs/examples/substrate/function_fallback_and_receive.sol → docs/examples/polkadot/function_fallback_and_receive.sol


+ 0 - 0
docs/examples/substrate/function_modifier.sol → docs/examples/polkadot/function_modifier.sol


+ 0 - 0
docs/examples/substrate/function_multiple_modifiers.sol → docs/examples/polkadot/function_multiple_modifiers.sol


+ 0 - 0
docs/examples/substrate/function_override_modifiers.sol → docs/examples/polkadot/function_override_modifiers.sol


+ 0 - 0
docs/examples/substrate/function_selector_override.sol → docs/examples/polkadot/function_selector_override.sol


+ 1 - 1
docs/examples/substrate/hash_type.sol → docs/examples/polkadot/hash_type.sol

@@ -1,4 +1,4 @@
-import "substrate";
+import "polkadot";
 
 contract c {
     bytes32 current;

+ 0 - 0
docs/examples/substrate/interface.sol → docs/examples/polkadot/interface.sol


+ 0 - 0
docs/examples/substrate/statement_try_catch_call.sol → docs/examples/polkadot/statement_try_catch_call.sol


+ 0 - 0
docs/examples/substrate/statement_try_catch_constructor.sol → docs/examples/polkadot/statement_try_catch_constructor.sol


+ 0 - 0
docs/examples/substrate/statement_try_catch_no_error_handling.sol → docs/examples/polkadot/statement_try_catch_no_error_handling.sol


+ 2 - 2
docs/extension.rst

@@ -30,8 +30,8 @@ You can choose between the following targets:
 solana
    Solidity for Solana
 
-substrate
-   Solidity for Substrate (Polkadot)
+polkadot
+   Solidity for Polkadot (Substrate contracts pallet)
 
 evm
    Solidity for any EVM based chain like Ethereum

+ 2 - 2
docs/index.rst

@@ -12,7 +12,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/>`_ and
-`Parity Substrate <https://substrate.io/>`_. It uses the
+`Polkadot <https://substrate.io/>`_. It uses the
 `llvm <https://www.llvm.org/>`_ compiler framework to produce WebAssembly
 (WASM) or Solana SBF contract code. As result, the output is highly optimized, which saves you in gas costs
 or compute units.
@@ -39,7 +39,7 @@ Contents
    :caption: Targets
 
    targets/solana.rst
-   targets/substrate.rst
+   targets/polkadot.rst
 
 .. toctree::
    :maxdepth: 3

+ 21 - 21
docs/language/builtins.rst

@@ -49,10 +49,10 @@ uint128 ``msg.value``
 bytes ``msg.data``
     The raw ABI encoded arguments passed to the current call.
 
-bytes4 (Substrate) or bytes8 (Solana) ``msg.sig``
+bytes4 (Polkadot) or bytes8 (Solana) ``msg.sig``
     Function selector (or discriminator for Solana) from the encoded calldata,
     e.g. the first four or eight bytes. This might be 0 if no function selector was present.
-    In Ethereum, constructor calls do not have function selectors but in Parity Substrate they do.
+    In Ethereum, constructor calls do not have function selectors but in Polkadot they do.
     On Solana, selectors are called discriminators.
 
 address ``msg.sender``
@@ -66,7 +66,7 @@ address ``msg.sender``
 .. _gasprice:
 
 uint128 ``tx.gasprice``
-    The price of one unit of gas. This field cannot be used on Parity Substrate,
+    The price of one unit of gas. This field cannot be used on Polkadot,
     see the warning box below.
 
 .. note::
@@ -79,7 +79,7 @@ uint128 ``tx.gasprice(uint64 gas)``
     The total price of `gas` units of gas.
 
 .. warning::
-    On Parity Substrate, the cost of one gas unit may not be an exact whole round value. In fact,
+    On Polkadot, the cost of one gas unit may not be an exact whole round value. In fact,
     if the gas price is less than 1 it may round down to 0, giving the incorrect appearance gas is free.
     Therefore, avoid the ``tx.gasprice`` member in favour of the function ``tx.gasprice(uint64 gas)``.
 
@@ -100,7 +100,7 @@ uint128 ``tx.gasprice(uint64 gas)``
     Note this function is not available on the Ethereum Foundation Solidity compiler.
 
 address ``tx.origin``
-    The address that started this transaction. Not available on Parity Substrate or Solana.
+    The address that started this transaction. Not available on Polkadot or Solana.
 
 AccountInfo[] ``tx.accounts``
     Only available on Solana. See :ref:`account_info`. Here is an example:
@@ -142,8 +142,8 @@ Solana
 uint64 ``block.slot``
     The current slot. This is an alias for ``block.number``.
 
-Parity Substrate
-~~~~~~~~~~~~~~~~
+Polkadot
+~~~~~~~~
 
 uint128 ``block.minimum_deposit``
     The minimum amonut needed to create a contract. This does not include
@@ -202,7 +202,7 @@ to identify what the problem is.
 ABI encoding and decoding
 _________________________
 
-The ABI encoding depends on the target being compiled for. Substrate uses the
+The ABI encoding depends on the target being compiled for. Polkadot uses the
 `SCALE Codec <https://docs.substrate.io/reference/scale-codec/>`_.
 
 abi.decode(bytes, (*type-list*))
@@ -233,7 +233,7 @@ ABI encodes the arguments to bytes. Any number of arguments can be provided.
     uint16 x = 241;
     bytes foo = abi.encode(x);
 
-On Substrate, foo will be ``hex"f100"``. On Ethereum this will be ``hex"00000000000000000000000000000000000000000000000000000000000000f1"``.
+On Polkadot, foo will be ``hex"f100"``. On Ethereum this will be ``hex"00000000000000000000000000000000000000000000000000000000000000f1"``.
 
 abi.encodeWithSelector(selector, ...)
 ++++++++++++++++++++++++++++++++++++++++++++
@@ -244,7 +244,7 @@ After the selector, any number of arguments can be provided.
 .. code-block:: solidity
 
     // An eight-byte selector (discriminator) is exclusive for Solana.
-    // On Substrate, the selector contains four bytes. hex"01020304" is an example.
+    // On Polkadot, the selector contains four bytes. hex"01020304" is an example.
     bytes foo = abi.encodeWithSelector(hex"0102030405060708", uint16(0xff00));
 
 On Solana, foo will be ``hex"080706050403020100ff"``. In addition, a discriminator for a Solidity function on Solana
@@ -261,7 +261,7 @@ abi.encodeWithSignature(string signature, ...)
 ABI encodes the arguments with the hash of the signature. After the signature, any number of arguments
 can be provided.
 
-On Substrate, the signature is the name of the function followed by its arguments, for example:
+On Polkadot, the signature is the name of the function followed by its arguments, for example:
 
 .. code-block:: solidity
 
@@ -291,7 +291,7 @@ bytes will be encoded, not the length. It is not possible to decode packed encod
 
     bytes foo = abi.encodePacked(uint16(0xff00), "ABCD");
 
-On Substrate, foo will be ``hex"00ff41424344"``. On Ethereum this will be ``hex"ff0041424344"``.
+On Polkadot, foo will be ``hex"00ff41424344"``. On Ethereum this will be ``hex"ff0041424344"``.
 
 abi.encodeCall(function, ...)
 +++++++++++++++++++++++++++++
@@ -305,16 +305,16 @@ are cast and checked against the function specified as the first argument.
 Hash
 ++++
 
-Only available on Substrate, it represents the ``Hash`` type from ``ink_primitives`` via user type definition.
+Only available on Polkadot, it represents the ``Hash`` type from ``ink_primitives`` via user type definition.
 Its underlying type is ``bytes32``, but it will be reported correctly as the ``Hash`` type in the metadata.
 
-.. include:: ../examples/substrate/hash_type.sol
+.. include:: ../examples/polkadot/hash_type.sol
   :code: solidity
 
 chain_extension(uint32 ID, bytes input) returns (uint32, bytes)
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
-Only available on Substrate. Call the chain extension with the given ``ID`` and ``input`` data.
+Only available on Polkadot. Call the chain extension with the given ``ID`` and ``input`` data.
 Returns the return value from the chain extension and the output data.
 
 This function is a low level interface.
@@ -338,18 +338,18 @@ The following example demonstrates the usage of this builtin function.
 It shows how the chain extension example from the `ink! documentation <https://use.ink/macros-attributes/chain-extension/>`_
 looks like in a solidity contract:
 
-.. include:: ../examples/substrate/call_chain_extension.sol
+.. include:: ../examples/polkadot/call_chain_extension.sol
   :code: solidity
 
 is_contract(address AccountId) returns (bool)
 +++++++++++++++++++++++++++++++++++++++++++++
 
-Only available on Substrate. Checks whether the given address is a contract address. 
+Only available on Polkadot. Checks whether the given address is a contract address. 
 
 set_code_hash(uint8[32] hash) returns (uint32)
 ++++++++++++++++++++++++++++++++++++++++++++++
 
-Only available on Substrate. Replace the contract's code with the code corresponding to ``hash``.
+Only available on Polkadot. Replace the contract's code with the code corresponding to ``hash``.
 Assumes that the new code was already uploaded, otherwise the operation fails.
 A return value of 0 indicates success; a return value of 7 indicates that there was no corresponding code found.
 
@@ -395,7 +395,7 @@ This returns the ``bytes16`` blake2_128 hash of the bytes.
 
 .. note::
 
-    This function is only available on Parity Substrate.
+    This function is only available on Polkadot.
 
 blake2_256(bytes)
 +++++++++++++++++
@@ -404,7 +404,7 @@ This returns the ``bytes32`` blake2_256 hash of the bytes.
 
 .. note::
 
-    This function is only available on Parity Substrate.
+    This function is only available on Polkadot.
 
 signatureVerify(address public_key, bytes message, bytes signature)
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -610,7 +610,7 @@ print() takes a string argument.
 
   print() is not available with the Ethereum Foundation Solidity compiler.
 
-  When using Substrate, this function is only available on development chains.
+  When using Polkadot, this function is only available on development chains.
   If you use this function on a production chain, the contract will fail to load.
 
 .. _selfdestruct:

+ 7 - 7
docs/language/contracts.rst

@@ -8,7 +8,7 @@ When a contract is deployed, the contract storage is initialized to the initiali
 and any constructor is called. A constructor is not required for a contract. A constructor is defined
 like so:
 
-.. include:: ../../examples/substrate/flipper.sol
+.. include:: ../../examples/polkadot/flipper.sol
   :code: solidity
 
 A constructor can have any number of arguments.
@@ -17,9 +17,9 @@ If a constructor has arguments, they must be supplied when the contract is deplo
 If a contract is expected to receive value on instantiation, the constructor should be declared ``payable``.
 
 .. note::
-    Solang allows naming constructors in the Substrate target:
+    Solang allows naming constructors in the Polkadot target:
 
-    .. include:: ../examples/substrate/constructor_named.sol
+    .. include:: ../examples/polkadot/constructor_named.sol
       :code: solidity
 
     Constructors without a name will be called ``new`` in the metadata.
@@ -33,7 +33,7 @@ _______________________
 Contracts can be created using the ``new`` keyword. The contract that is being created might have
 constructor arguments, which need to be provided.
 
-.. include:: ../examples/substrate/contract_new.sol
+.. include:: ../examples/polkadot/contract_new.sol
   :code: solidity
 
 The constructor might fail for various reasons, for example ``require()`` might fail here. This can
@@ -51,13 +51,13 @@ _________________________________
 It is possible to send value to the new contract. This can be done with the ``{value: 500}``
 syntax, like so:
 
-.. include:: ../examples/substrate/contract_payable.sol
+.. include:: ../examples/polkadot/contract_payable.sol
   :code: solidity
 
 The constructor should be declared ``payable`` for this to work.
 
 .. note::
-    If no value is specified, then on Parity Substrate the minimum balance (also know as the
+    If no value is specified, then on Polkadot the minimum balance (also know as the
     existential deposit) is sent.
 
 .. note::
@@ -84,7 +84,7 @@ with the same salt and arguments will fail.  The salt is of type ``bytes32``.
 If gas is specified, this limits the amount gas the constructor for the new contract
 can use. gas is a ``uint64``.
 
-.. include:: ../examples/substrate/contract_gas_limit.sol
+.. include:: ../examples/polkadot/contract_gas_limit.sol
   :code: solidity
 
 .. _solana_constructor:

+ 1 - 1
docs/language/events.rst

@@ -27,7 +27,7 @@ a different number of arguments.
     be passed for Solana's ``sol_log_data`` system call, regardless if the ``indexed`` keyword is present or not.
     This behavior follows what Solana's Anchor framework does.
 
-In Parity Substrate, the topic fields are always the hash of the value of the field. Ethereum only hashes fields
+In Polkadot, the topic fields are always the hash of the value of the field. Ethereum only hashes fields
 which do not fit in the 32 bytes. Since a cryptographic hash is used, it is only possible to compare the topic against a
 known value.
 

+ 1 - 1
docs/language/expressions.rst

@@ -146,7 +146,7 @@ in the EIP.
 The contract code for a contract, i.e. the binary WebAssembly or Solana SBF, can be retrieved using the
 ``type(c).creationCode`` and ``type(c).runtimeCode`` fields, as ``bytes``. On EVM,
 the constructor code is in the ``creationCode`` and all the functions are in
-the ``runtimeCode``. Parity Substrate and Solana use the same
+the ``runtimeCode``. Polkadot and Solana use the same
 code for both, so those fields will evaluate to the same value.
 
 .. include:: ../examples/retrieve_contract_code.sol

+ 15 - 15
docs/language/functions.rst

@@ -19,7 +19,7 @@ which are provided in the return statement, the values of the return variables a
 of the function is returned. It is still possible to explicitly return some values
 with a return statement.
 
-Any DocComment before a function will be include in the ABI. Currently only Substrate
+Any DocComment before a function will be include in the ABI. Currently only Polkadot
 supports documentation in the ABI.
 
 Function visibility
@@ -135,7 +135,7 @@ _________________________________________
 For external calls, value can be sent along with the call. The callee must be
 ``payable``. Likewise, a gas limit can be set.
 
-.. include:: ../examples/substrate/function_call_external_gas.sol
+.. include:: ../examples/polkadot/function_call_external_gas.sol
   :code: solidity
 
 .. note::
@@ -162,32 +162,32 @@ A constructor can be marked ``payable``, in which case value can be passed with
 constructor.
 
 .. note::
-    If value is sent to a non-payable function on Parity Substrate, the call will be
+    If value is sent to a non-payable function on Polkadot, the call will be
     reverted. However there is no refund performed, so value will remain with the callee.
 
-    ``payable`` on constructors is not enforced on Parity Substrate. Funds are needed
+    ``payable`` on constructors is not enforced on Polkadot,. Funds are needed
     for storage rent and there is a minimum deposit needed for the contract. As a result,
-    constructors always receive value on Parity Substrate.
+    constructors always receive value on Polkadot.
 
 Overriding function selector
 ____________________________
 
 When a function is called, the function selector and the arguments are serialized
 (also known as abi encoded) and passed to the program. The function selector is
-what the runtime program uses to determine what function was called. On Substrate, the
+what the runtime program uses to determine what function was called. On Polkadot, the
 function selector is generated using a deterministic hash value of the function
 name and the arguments types. On Solana, the selector is known as discriminator.
 
 The selector value can be overriden with the annotation
 ``@selector([0xde, 0xad, 0xbe, 0xa1])``.
 
-.. include:: ../examples/substrate/function_selector_override.sol
+.. include:: ../examples/polkadot/function_selector_override.sol
   :code: solidity
 
-The given example only works for Substrate, whose selectors are four bytes wide. On Solana, they are eight bytes wide.
+The given example only works for Polkadot, whose selectors are four bytes wide. On Solana, they are eight bytes wide.
 
 Only ``public`` and ``external`` functions have a selector, and can have their
-selector overriden. On Substrate, constructors have selectors too, so they
+selector overriden. On Polkadot, constructors have selectors too, so they
 can also have their selector overriden. If a function overrides another one in a
 base contract, then the selector of both must match.
 
@@ -217,7 +217,7 @@ values. Here is an example of an overloaded function:
 In the function foo, abs() is called with an ``int64`` so the second implementation
 of the function abs() is called.
 
-Both Substrate and Solana runtime require unique function names, so
+Both Polkadot and Solana runtime require unique function names, so
 overloaded function names will be mangled in the ABI or the IDL.
 The function name will be concatenated with all of its argument types, separated by underscores, using the
 following rules:
@@ -240,7 +240,7 @@ Function modifiers are used to check pre-conditions or post-conditions for a fun
 new modifier must be declared which looks much like a function, but uses the ``modifier``
 keyword rather than ``function``.
 
-.. include:: ../examples/substrate/function_modifier.sol
+.. include:: ../examples/polkadot/function_modifier.sol
   :code: solidity
 
 The function `foo` can only be run by the owner of the contract, else the ``require()`` in its
@@ -272,13 +272,13 @@ this example, the `only_owner` modifier is run first, and if that reaches ``_;``
 `check_price` is executed. The body of function `foo()` is only reached once `check_price()`
 reaches ``_;``.
 
-.. include:: ../examples/substrate/function_multiple_modifiers.sol
+.. include:: ../examples/polkadot/function_multiple_modifiers.sol
   :code: solidity
 
 Modifiers can be inherited or declared ``virtual`` in a base contract and then overriden, exactly like
 functions can be.
 
-.. include:: ../examples/substrate/function_override_modifiers.sol
+.. include:: ../examples/polkadot/function_override_modifiers.sol
   :code: solidity
 
 Calling an external function using ``call()``
@@ -339,7 +339,7 @@ documentations for more information.
     ``delegatecall`` is not available on Solana.
 
 ..  note::
-    On Substrate, specifying ``gas`` won't have any effect on ``delegatecall``.
+    On Polkadot, specifying ``gas`` won't have any effect on ``delegatecall``.
 
 fallback() and receive() function
 _________________________________
@@ -357,7 +357,7 @@ call is made without value and no ``fallback()`` is defined, then the call also
 
 Both functions must be declared ``external``.
 
-.. include:: ../examples/substrate/function_fallback_and_receive.sol
+.. include:: ../examples/polkadot/function_fallback_and_receive.sol
   :code: solidity
 
 ..  note::

+ 1 - 1
docs/language/interface_libraries.rst

@@ -7,7 +7,7 @@ __________
 An interface is a contract sugar type with restrictions. This type cannot be instantiated; it can only define the
 functions prototypes for a contract. This is useful as a generic interface.
 
-.. include:: ../examples/substrate/interface.sol
+.. include:: ../examples/polkadot/interface.sol
   :code: solidity
 
 - Interfaces can only have other interfaces as a base contract

+ 4 - 4
docs/language/introduction.rst

@@ -24,18 +24,18 @@ Differences:
 Unique features to Solang:
 
 - Solang can target different blockchains and some features depending on the target.
-  For example, Parity Substrate uses a different ABI encoding and allows constructors
+  For example, Polkadot uses a different ABI encoding and allows constructors
   to be named.
 - Events can be declared outside of contracts
 - Base contracts can be declared in any order
 - There is a ``print()`` function for debugging
 - Strings can be formatted with python style format string, which is useful for debugging: ``print("x = {}".format(x));``
 - Ethereum style address literals like ``0xE0f5206BBD039e7b0592d8918820024e2a7437b9`` are
-  not supported on Substrate or Solana, but are supported for EVM.
-- On Substrate and Solana, base58 style encoded address literals like
+  not supported on Polkadot or Solana, but are supported for EVM.
+- On Polkadot and Solana, base58 style encoded address literals like
   ``address"5GBWmgdFAMqm8ZgAHGobqDqX6tjLxJhv53ygjNtaaAn3sjeZ"`` are supported, but
   not with EVM.
 - On Solana, there is special builtin import file called ``'solana'`` available.
-- On Substrate, there is special builtin import file called ``'substrate'`` available.
+- On Polkadot, there is special builtin import file called ``'polkadot'`` available.
 - Different blockchains offer different builtins. See the :ref:`builtins documentation <builtins>`.
 - There are many more differences, which are noted throughout the documentation.

+ 2 - 2
docs/language/managing_values.rst

@@ -8,7 +8,7 @@ Value in Solidity is represented by ``uint128``.
 
 .. note::
 
-    Parity Substrate can be compiled with a different type for ``T::Balance``. If you
+    On Polkadot, contracts can be compiled with a different type for ``T::Balance``. If you
     need support for a different type, please raise an
     `issue <https://github.com/hyperledger/solang/issues>`_.
 
@@ -19,7 +19,7 @@ The balance of a contract can be checked with `address` ``.balance``, so your ow
 is ``address(this).balance``.
 
 .. note::
-    Parity Substrate cannot check the balance for contracts other than the current
+    Polkadot cannot check the balance for contracts other than the current
     one. If you need to check the balance of another contract, then add a balance
     function to that contract like the one below, and call that function instead.
 

+ 3 - 3
docs/language/statements.rst

@@ -127,18 +127,18 @@ be passed a reason code, which can be inspected using the ``catch Error(string)`
     On Solana, any transaction that fails halts the execution of a contract. The try-catch statement, thus,
     is not supported for Solana contracts and the compiler will raise an error if it detects its usage.
 
-.. include:: ../examples/substrate/statement_try_catch_constructor.sol
+.. include:: ../examples/polkadot/statement_try_catch_constructor.sol
   :code: solidity
 
 The same statement can be used for calling external functions. The ``returns (...)``
 part must match the return types for the function. If no name is provided, that
 return value is not accessible.
 
-.. include:: ../examples/substrate/statement_try_catch_call.sol
+.. include:: ../examples/polkadot/statement_try_catch_call.sol
   :code: solidity
 
 There is an alternate syntax which avoids the abi decoding by leaving the `catch Error(…)` out.
 This might be useful when no error string is expected, and will generate shorter code.
 
-.. include:: ../examples/substrate/statement_try_catch_no_error_handling.sol
+.. include:: ../examples/polkadot/statement_try_catch_no_error_handling.sol
   :code: solidity

+ 7 - 8
docs/language/types.rst

@@ -125,7 +125,7 @@ Address and Address Payable Type
 ________________________________
 
 The ``address`` type holds the address of an account. The length of an ``address`` type depends on
-the target being compiled for. On EVM, an address is 20 bytes. Solana and Substrate have an address
+the target being compiled for. On EVM, an address is 20 bytes. Solana and Polkadot have an address
 length of 32 bytes. The format of an address literal depends on what target you are building for. On EVM,
 ethereum addresses can be specified with a particular hexadecimal number.
 
@@ -152,7 +152,7 @@ In order to fix the address literal, copy the address literal from the compiler
 
   error: address literal has incorrect checksum, expected ‘0xE9430d8C01C4E4Bb33E44fd7748942085D82fC91’
 
-Substrate or Solana addresses are base58 encoded, not hexadecimal. An address literal can be specified with
+Polkadot or Solana addresses are base58 encoded, not hexadecimal. An address literal can be specified with
 the special syntax ``address"<account>"``.
 
 .. code-block:: solidity
@@ -184,7 +184,7 @@ bytes types and integer types. The ``==`` and ``!=`` operators work for comparin
 
 .. note::
 
-    Substrate can be compiled with a different type for Address. If your substrate has a different
+    Polkadot can be compiled with a different type for Address. If your target runtime has a different
     length for address, you can specify ``--address-length`` on the command line.
 
 Enums
@@ -293,7 +293,7 @@ On Solang, it is not necessary to cast the first element of the array literal.
   32 bytes. However, since ``bytes32`` is a primitive in itself, this will only be 32
   bytes when ABI encoded.
 
-  On Substrate, the `SCALE <https://docs.substrate.io/reference/scale-codec/>`_
+  On Polkadot, the `SCALE <https://docs.substrate.io/reference/scale-codec/>`_
   encoding uses 32 bytes for both types. Similarly, the `borsh encoding <https://borsh.io/>`_
   used on Solana uses 32 bytes for both types.
 
@@ -421,7 +421,7 @@ it is not possible to ``delete`` an entire mapping itself, but individual mappin
 
 .. note::
 
-  Solidity on Ethereum and on Substrate takes the keccak 256 hash of the key and the storage slot, and simply uses that
+  Solidity on Ethereum and on Polkadot takes the keccak 256 hash of the key and the storage slot, and simply uses that
   to find the entry. Its underlying hash table does not use separate chaining for collision resolution.
   The scheme is simple and avoids `"hash flooding" <https://en.wikipedia.org/wiki/Collision_attack#Hash_flooding>`_
   attacks that utilize hash collisions to exploit the worst-case time complexity for a separately chained
@@ -435,8 +435,7 @@ it is not possible to ``delete`` an entire mapping itself, but individual mappin
   space than the 256 bit storage slots. Any suggestions for solving this are very welcome!
 
   SipHash may serve as a way to implement mappings in memory, which would allow them to be local variables in
-  functions. Although the Substrate environment provides a function to generate random numbers to serve
-  as the hashes' secret, on Solana a safe alternative still needs to be found.
+  functions. Although, a safe alternative to random seeds still needs to be found.
 
 Contract Types
 ______________
@@ -448,7 +447,7 @@ sugar for calling functions on it.
 A contract can be created with the new statement, followed by the name of the contract. The
 arguments to the constructor must be provided.
 
-.. include:: ../examples/substrate/contract_type.sol
+.. include:: ../examples/polkadot/contract_type.sol
   :code: solidity
 
 Since child does not have a constructor, no arguments are needed for the new statement. The variable

+ 9 - 9
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/>`_ and
-`Parity Substrate <https://substrate.io/>`_.
+`Polkadot <https://substrate.io/>`_ (via the ``contracts`` pallet runtime).
 
 Solang supports auto-completion for multiple shells. Use ``solang shell-complete --help`` to
 learn whether your favorite shell is supported. If so, evaluate the output of
@@ -35,15 +35,15 @@ Options:
   will be silent if there are no errors or warnings.
 
 \-\-target *target*
-  This takes one argument, which can either be ``solana`` or ``substrate``. The target
+  This takes one argument, which can either be ``solana`` or ``polkadot``. The target
   must be specified.
 
 \-\-address\-length *length-in-bytes*
-  Change the default address length on Substrate. By default, Substate uses an address type of 32 bytes. This option
+  Change the default address length on Polkadot. By default, Substate uses an address type of 32 bytes. This option
   is ignored for any other target.
 
 \-\-value\-length *length-in-bytes*
-  Change the default value length on Substrate. By default, Substate uses an value type of 16 bytes. This option
+  Change the default value length on Polkadot. By default, Substate uses an value type of 16 bytes. This option
   is ignored for any other target.
 
 -o, \-\-output *directory*
@@ -51,7 +51,7 @@ Options:
 
 \-\-output\-meta *directory*
   Sets the directory where metadata should be saved. For Solana, the metadata is the Anchor IDL file,
-  and, for Substrate, the .contract file. If this option is not set, the directory specified by ``--output``
+  and, for Polkadot, the .contract file. If this option is not set, the directory specified by ``--output``
   is used, and if that is not set either, the current working directory is used.
 
 \-\-contract *contract-name* [, *contract-name*]...
@@ -144,7 +144,7 @@ Options:
 
 
   Fields not explicitly present in the .toml acquire the compiler's default value.
-  If any other argument is provided in the command line, for example, ``solang compile --config-file --target substrate``, the argument will be overridden.
+  If any other argument is provided in the command line, for example, ``solang compile --config-file --target polkadot``, the argument will be overridden.
   The priority for the args is given as follows:
   1. Command line
   2. Configuration file
@@ -192,15 +192,15 @@ followed by one or more solidity source filenames.
 Options:
 
 \-\-target *target*
-  This takes one argument, which can either be ``solana`` or ``substrate``. The target
+  This takes one argument, which can either be ``solana`` or ``polkadot``. The target
   must be specified.
 
 \-\-address\-length *length-in-bytes*
-  Change the default address length on Substrate. By default, Substate uses an address type of 32 bytes. This option
+  Change the default address length on Polkadot. By default, Substate uses an address type of 32 bytes. This option
   is ignored for any other target.
 
 \-\-value\-length *length-in-bytes*
-  Change the default value length on Substrate. By default, Substate uses an value type of 16 bytes. This option
+  Change the default value length on Polkadot. By default, Substate uses an value type of 16 bytes. This option
   is ignored for any other target.
 
 \-\-importpath *directory*

+ 12 - 15
docs/targets/substrate.rst → docs/targets/polkadot.rst

@@ -1,12 +1,10 @@
-Parity Substrate
-================
+Polkadot
+========
 
-Solang works with Parity Substrate 3.0. Note that for recent Substrate versions, 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.
+Solang works on Polkadot Parachains integrating a recent version of the ``contracts`` pallets.
+Solidity flavored for the Polkadot target has the following differences to Ethereum Solidity:
 
-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"
+- 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://docs.substrate.io/reference/scale-codec/>`_ encoding
 - Constructors can be named. Constructors with no name will be called ``new`` in the generated metadata.
@@ -20,7 +18,7 @@ directory. Write this to flipper.sol and run:
 
 .. code-block:: bash
 
-  solang compile --target substrate flipper.sol
+  solang compile --target polkadot flipper.sol
 
 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
@@ -30,12 +28,12 @@ Builtin Imports
 ________________
 
 Some builtin functionality is only available after importing. The following types
-can be imported via the special import file ``substrate``.
+can be imported via the special import file ``polkadot``.
 
 .. code-block:: solidity
 
-    import {Hash} from 'substrate';
-    import {chain_extension} from 'substrate';
+    import {Hash} from 'polkadot';
+    import {chain_extension} from 'polkadot';
 
 Note that ``{Hash}`` can be omitted, renamed or imported via
 import object.
@@ -43,12 +41,11 @@ import object.
 .. code-block:: solidity
 
     // Now Hash will be known as InkHash
-    import {Hash as InkHash} from 'substrate';
+    import {Hash as InkHash} from 'polkadot';
 
 .. note::
 
-    The import file ``substrate`` is only available when compiling for the Substrate
-    target.
+    The import file ``polkadot`` is only available when compiling for the Polkadot target.
 
 Call Flags
 __________
@@ -62,6 +59,6 @@ By default (if this argument is unset), no flag will be set.
 
 The following example shows how call flags can be used:
 
-.. include:: ../examples/substrate/call_flags.sol
+.. include:: ../examples/polkadot/call_flags.sol
   :code: solidity
 

+ 2 - 2
docs/testing.rst

@@ -38,10 +38,10 @@ These tests do the following:
 Mock contract virtual machine
 -----------------------------
 
-For Substrate and Solana there is a mock virtual machine. System and runtime call
+For Polkadot and Solana there is a mock virtual machine. System and runtime call
 implementations should semantically represent the real on-chain virtual machine as exact as
 possible. Aspects that don't matter in the context of unit testing (e.g. gas-metering) may be
-ignored in the mock virtual machine. For Substrate, this uses the
+ignored in the mock virtual machine. For Polkadot, this uses the
 `wasmi crate <https://crates.io/crates/wasmi>`_ and for Solana it
 uses the `Solana RBPF crate <https://crates.io/crates/solana_rbpf>`_.
 

+ 1 - 1
docs/yul_language/builtins.rst

@@ -7,7 +7,7 @@ Builtins
 Most operations in Yul are performed via builtin functions. Solang supports
 most builtins, however memory operations and chain operations are not implemented.
 Yul builtins are low level instructions and many are `ethereum specific <https://ethereum.org/en/developers/docs/evm/opcodes/>`_.
-On Solana and Substrate, some builtins, like ``delegatecall`` and ``staticcall``, for instance, are not available
+On Solana and Polkadot, some builtins, like ``delegatecall`` and ``staticcall``, for instance, are not available
 because the concept they implement does not exist in neither chains.
 
 .. warning::

+ 0 - 0
examples/substrate/ballot.sol → examples/polkadot/ballot.sol


+ 0 - 0
examples/substrate/flipper.sol → examples/polkadot/flipper.sol


+ 1 - 1
examples/substrate/substrate_config.toml → examples/polkadot/substrate_config.toml

@@ -6,7 +6,7 @@ import_map = {}   # Maps to import. Define as  import_map = {map = "path/to/map1
 
 
 [target]
-name = "substrate"  # Valid targets are "solana" and "substrate"
+name = "polkadot"  # Valid targets are "solana" and "polkadot"
 address_length = 32
 value_length = 16
 

+ 1 - 1
examples/solana/solana_config.toml

@@ -6,7 +6,7 @@ import_map = {}   # Maps to import. Define as  import_map = {map = "path/to/map1
 
 
 [target]
-name = "solana" # Valid targets are "solana" and "substrate"
+name = "solana" # Valid targets are "solana" and "polkadot"
 
 [debug-features]
 prints = true   # Log debug prints to the environment.

+ 0 - 0
integration/substrate/.gitignore → integration/polkadot/.gitignore


+ 0 - 0
integration/substrate/ConstructorDispatch.sol → integration/polkadot/ConstructorDispatch.sol


+ 0 - 0
integration/substrate/UniswapV2ERC20.sol → integration/polkadot/UniswapV2ERC20.sol


+ 0 - 0
integration/substrate/UniswapV2ERC20.spec.ts → integration/polkadot/UniswapV2ERC20.spec.ts


+ 0 - 0
integration/substrate/UniswapV2Factory.sol → integration/polkadot/UniswapV2Factory.sol


+ 0 - 0
integration/substrate/UniswapV2Factory.spec.ts → integration/polkadot/UniswapV2Factory.spec.ts


+ 0 - 0
integration/substrate/UniswapV2Pair.sol → integration/polkadot/UniswapV2Pair.sol


+ 0 - 0
integration/substrate/UniswapV2Pair.spec.ts → integration/polkadot/UniswapV2Pair.spec.ts


+ 0 - 0
integration/substrate/UpgradeableProxy.sol → integration/polkadot/UpgradeableProxy.sol


+ 0 - 0
integration/substrate/array_struct_mapping_storage.sol → integration/polkadot/array_struct_mapping_storage.sol


+ 0 - 0
integration/substrate/array_struct_mapping_storage.spec.ts → integration/polkadot/array_struct_mapping_storage.spec.ts


+ 0 - 0
integration/substrate/arrays.sol → integration/polkadot/arrays.sol


+ 0 - 0
integration/substrate/arrays.spec.ts → integration/polkadot/arrays.spec.ts


+ 0 - 0
integration/substrate/asserts.sol → integration/polkadot/asserts.sol


+ 0 - 0
integration/substrate/asserts.spec.ts → integration/polkadot/asserts.spec.ts


+ 0 - 0
integration/substrate/balances.sol → integration/polkadot/balances.sol


+ 0 - 0
integration/substrate/balances.spec.ts → integration/polkadot/balances.spec.ts


+ 2 - 2
integration/substrate/build.sh → integration/polkadot/build.sh

@@ -6,7 +6,7 @@ if [[ $dup_contracts ]]; then
 	echo "Found contract with duplicate names: ${dup_contracts}"
 	/bin/false
 else
-	parallel solang compile -v -g --wasm-opt Z --target substrate ::: *.sol test/*.sol tornado/contracts/*.sol
-	solang compile -v --target substrate --release release_version.sol
+	parallel solang compile -v -g --wasm-opt Z --target polkadot ::: *.sol test/*.sol tornado/contracts/*.sol
+	solang compile -v --target polkadot --release release_version.sol
 fi
 

+ 0 - 0
integration/substrate/builtins.sol → integration/polkadot/builtins.sol


+ 0 - 0
integration/substrate/builtins.spec.ts → integration/polkadot/builtins.spec.ts


+ 0 - 0
integration/substrate/builtins2.sol → integration/polkadot/builtins2.sol


+ 0 - 0
integration/substrate/builtins2.spec.ts → integration/polkadot/builtins2.spec.ts


+ 0 - 0
integration/substrate/call_flags.sol → integration/polkadot/call_flags.sol


+ 0 - 0
integration/substrate/call_flags.spec.ts → integration/polkadot/call_flags.spec.ts


+ 1 - 1
integration/substrate/chain_extension.sol → integration/polkadot/chain_extension.sol

@@ -1,4 +1,4 @@
-import "substrate";
+import "polkadot";
 
 contract ChainExtension {
     // Implementation on the node:

+ 0 - 0
integration/substrate/chain_extension.spec.ts → integration/polkadot/chain_extension.spec.ts


+ 0 - 0
integration/substrate/constructor_dispatch.spec.ts → integration/polkadot/constructor_dispatch.spec.ts


+ 0 - 0
integration/substrate/create_contract.sol → integration/polkadot/create_contract.sol


+ 0 - 0
integration/substrate/create_contract.spec.ts → integration/polkadot/create_contract.spec.ts


+ 0 - 0
integration/substrate/createpair.sol → integration/polkadot/createpair.sol


+ 0 - 0
integration/substrate/debug_buffer_format.sol → integration/polkadot/debug_buffer_format.sol


+ 0 - 0
integration/substrate/debug_buffer_format.spec.ts → integration/polkadot/debug_buffer_format.spec.ts


+ 0 - 0
integration/substrate/delegate_call.sol → integration/polkadot/delegate_call.sol


+ 0 - 0
integration/substrate/delegate_call.spec.ts → integration/polkadot/delegate_call.spec.ts


+ 0 - 0
integration/substrate/destruct.sol → integration/polkadot/destruct.sol


+ 0 - 0
integration/substrate/destruct.spec.ts → integration/polkadot/destruct.spec.ts


+ 0 - 0
integration/substrate/events.sol → integration/polkadot/events.sol


+ 0 - 0
integration/substrate/events.spec.ts → integration/polkadot/events.spec.ts


+ 0 - 0
integration/substrate/external_call.sol → integration/polkadot/external_call.sol


+ 0 - 0
integration/substrate/external_call.spec.ts → integration/polkadot/external_call.spec.ts


+ 0 - 0
integration/substrate/flipper.sol → integration/polkadot/flipper.sol


+ 0 - 0
integration/substrate/flipper.spec.ts → integration/polkadot/flipper.spec.ts


+ 0 - 0
integration/substrate/index.ts → integration/polkadot/index.ts


+ 0 - 0
integration/substrate/ink/caller/.gitignore → integration/polkadot/ink/caller/.gitignore


+ 0 - 0
integration/substrate/ink/caller/Cargo.toml → integration/polkadot/ink/caller/Cargo.toml


+ 0 - 0
integration/substrate/ink/caller/lib.rs → integration/polkadot/ink/caller/lib.rs


+ 0 - 0
integration/substrate/ink_cross_calls.spec.ts → integration/polkadot/ink_cross_calls.spec.ts


+ 0 - 0
integration/substrate/inkee.sol → integration/polkadot/inkee.sol


+ 0 - 0
integration/substrate/interfaces/IERC20.sol → integration/polkadot/interfaces/IERC20.sol


+ 0 - 0
integration/substrate/interfaces/IUniswapV2Callee.sol → integration/polkadot/interfaces/IUniswapV2Callee.sol


+ 0 - 0
integration/substrate/interfaces/IUniswapV2ERC20.sol → integration/polkadot/interfaces/IUniswapV2ERC20.sol


+ 0 - 0
integration/substrate/interfaces/IUniswapV2Factory.sol → integration/polkadot/interfaces/IUniswapV2Factory.sol


+ 0 - 0
integration/substrate/interfaces/IUniswapV2Pair.sol → integration/polkadot/interfaces/IUniswapV2Pair.sol


Some files were not shown because too many files changed in this diff