diff --git a/docs/_docs/testnet/changelog.md b/changelog.md similarity index 100% rename from docs/_docs/testnet/changelog.md rename to changelog.md diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 62c893550a..0000000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea/ \ No newline at end of file diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 02abab4575..0000000000 --- a/docs/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Ten Doc Site - -This is the Ten Doc Site and it looks like [this](https://docs.ten.xyz/). - -## Adding New Doc Site Pages - -1. Clone this repository: https://github.com/ten-protocol/go-ten -2. Create your new content as a Markdown file in the `/docs` folder of the repo. Take care with the folder structure. - As a general rule, new titles in the left hand navigation menu should have their content contained in a separate - subfolder under docs, for example, `/docs/testnet` contains all the Markdown files relation to the testnet docs. -3. To have this new content shown in the left-hand navigation menu you need to modify the file - `/docs/_data/navigation.yml`. Follow the same format to add new headings and content titles. Remember to specify the - file type as `.html` for your new Markdown files, not `.md` when providing the URL. -4. Push your changes to tennet/go-ten -5. GitHub Pages will trigger a GitHub Action to use a Jekyll build job to create the static content and then publish - the pages at the custom URL. -6. Browse to https://docs.ten.xyz/ and check your content. Remember your browser will cache some of the pages so hit - refresh a few times if it looks like the content is missing or the navigation menu is incorrect. - -## Updating Existing Doc Site Pages - -This is the same as `Adding New Doc Site Pages`, above, but omitting step #3. - -## Generating the HTML files locally - -You can check your changes (e.g. the Markdown formatting) by serving the changes locally as follows: - -1. [Install Jekyll](https://jekyllrb.com/docs/installation/) -2. Run the Jekyll `serve` command below to serve the updated pages on a local webserver at `http://127.0.0.1:4000`. Any - changes will be automatically reflected - - ``` - cd ./docs - bundle exec jekyll serve - ``` diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 66821585a7..0000000000 --- a/docs/_config.yml +++ /dev/null @@ -1,100 +0,0 @@ -# Theme Settings -remote_theme: "mmistakes/minimal-mistakes@4.24.0" -minimal_mistakes_skin: "default" - -# Site Settings -locale: "en-UK" -title: "Obscuro" -description: "Obscuro is an Ethereum-compatible confidential smart contract L2 network." -url: "https://ten.xyz" -name: "Obscuro" -repository: "obscuronet/obscuro.github.io" - -# Breadcrumb Settings -breadcrumbs: false -breadcrumb_home_label: "Home" -breadcrumb_seperator: ">" - -# Search Settings -search: true -search_provider: lunr -search_full_content: true -lunr: - search_within_pages: true - -# Collections of docs and posts -collections: - docs: # must have identically named folder in directory structure with preceding underscore, i.e. _docs - permalink: /:path/ - output: true - posts: - permalink: /:year/:title/ - output: true - -defaults: - # _docs - - scope: - path: "_docs" # folder name where docs md files are kept - type: docs - values: - sidebar: - nav: sidebar-list # has to match the name of the sidebar in navigation.yml - layout: single - classes: wide - strip_title: true - # _posts - - scope: - path: "_posts" # folder name where blog post files are kept - type: posts - values: - sidebar: - nav: sidebar-list # has to match the name of the sidebar in navigation.yml - layout: single - # all other pages including landing page need to be listed to have correct layout applied - - scope: - path: "" - type: pages - values: - sidebar: - nav: sidebar-list # has to match the name of the sidebar in navigation.yml - layout: single - classes: wide - strip_title: true - -# Outputting -paginate: 5 # amount of posts to show -paginate_path: /page:num/ - -plugins: - - jekyll-paginate - - jekyll-sitemap - - jekyll-include-cache - - jekyll-titles-from-headings - - jekyll-relative-links - - jekyll-archives - -titles_from_headings: - strip_title: true - collections: true - -atom_feed: - hide: true - -footer: - links: - - label: "Twitter" - icon: "fab fa-fw fa-twitter-square" - url: "https://twitter.com/obscuronet" - - label: "GitHub" - icon: "fab fa-fw fa-github" - url: "https://github.com/obscuronet" - - label: "Discord" - icon: "fab fa-fw fa-discord" - url: "https://discord.gg/7pkKv2Tyfn" - -analytics: - provider: "google-gtag" - google: - tracking_id: "G-XL6VWGQK1P" - -theme: jekyll-theme-slate \ No newline at end of file diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml deleted file mode 100644 index d79ae35c87..0000000000 --- a/docs/_data/navigation.yml +++ /dev/null @@ -1,73 +0,0 @@ -main: - - title: "Whitepaper" - url: https://whitepaper.ten.xyz - - title: "Tokenomics" - url: https://github.com/obscuronet/foundation/blob/main/token-utility-whitepaper.md - - title: "Community Contributions" - url: https://docs.ten.xyz/community/contributions - - title: "Get Help" - url: https://discord.gg/yQfmKeNzNd - - -sidebar-list: - - title: What is Obscuro? - children: - - title: Encrypted Ethereum - url: what-is-obscuro/encrypted-ethereum - - title: Developer quick start - url: what-is-obscuro/quick-start - - title: Technology - url: what-is-obscuro/technology - - title: User Experience - url: what-is-obscuro/user-experience - - title: Getting Started - children: - - title: Wallet Extension - url: wallet-extension/wallet-extension - - title: Configure MetaMask - url: wallet-extension/configure-metamask - - title: Tutorial - url: testnet/tutorial - - - title: Testnet - children: - - title: Introduction - url: testnet/Introduction - - title: Essential Information - url: testnet/essentials - - title: Deploying a Smart Contract - url: testnet/deploying-a-smart-contract - - title: Programmatic Deployment - url: testnet/deploying-a-smart-contract-programmatically - - title: Change Log - url: testnet/changelog - - title: Security - url: testnet/security - - - title: On Chain Capabilities - children: - - title: Cross Chain Messaging - url: cross-chain/core-messaging-layer - - title: Standard Bridge - url: cross-chain/bridge - - - title: Example dApps - children: - - title: Guessing Game - url: testnet/example-dapps - - - title: Tools - children: - - title: Tenscan - url: testnet/tenscan - - title: Token Faucet - url: testnet/faucet - - - title: API - children: - - title: APIs - url: api/apis - - title: Sensitive APIs - url: api/sensitive-apis - - title: Debug APIs - url: api/debug-apis \ No newline at end of file diff --git a/docs/_docs/api/apis.md b/docs/_docs/api/apis.md deleted file mode 100644 index 228b44321b..0000000000 --- a/docs/_docs/api/apis.md +++ /dev/null @@ -1,34 +0,0 @@ ---- ---- -# Ten JSON-RPC API - -Ten supports a subset of Ethereum's [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/). This -page details which JSON-RPC API methods are supported. - -## Supported JSON-RPC API methods - -Ten nodes support the following JSON-RPC API methods over both HTTP and websockets: - -* `eth_blockNumber` -* `eth_call` -* `eth_chainId` -* `eth_estimateGas` -* `eth_gasPrice` -* `eth_getBalance` -* `eth_getBlockByHash` -* `eth_getBlockByNumber` -* `eth_getCode` -* `eth_getLogs` -* `eth_getTransactionByHash` -* `eth_getTransactionCount` -* `eth_getTransactionReceipt` -* `eth_sendRawTransaction` - -## Supported subscription methods - -When connecting via websockets, the following API methods are also exposed: - -* `eth_subscribe` -* `eth_unsubscribe` - -The only supported subscription type is `logs`. \ No newline at end of file diff --git a/docs/_docs/api/debug-apis.md b/docs/_docs/api/debug-apis.md deleted file mode 100644 index a925de3b19..0000000000 --- a/docs/_docs/api/debug-apis.md +++ /dev/null @@ -1,55 +0,0 @@ ---- ---- -# Debug JSON-RPC API - -Ten supports a subset of Geth's [DEBUG JSON-RPC API](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug). This -page details which Debug JSON-RPC API methods are supported. - -## Supported JSON-RPC API methods - -Ten nodes support the following JSON-RPC API methods over both HTTP and websockets: - -* `debug_traceTransaction` -* `debug_eventLogRelevancy`: returns all event logs generated by the transaction Id, together with the relevancy metadata. Intended for developers on dev networks to debug smart contracts. This call is disabled for production networks - -## debug_LogVisibility - -Request Payload: -```go -{ - "jsonrpc": "2.0", - "method": "debug_eventLogRelevancy", - "params": [ - "0xb29737963fd6768587ede453ab90ff7668115db16915a7833705ef134e793814" - ], - "id": 1 -} -``` - -Request result: -```go -{ - "jsonrpc": "2.0", - "id": 1, - "result": [ - { - "address": "0x9802f661d17c65527d7abb59daad5439cb125a67", - "topics": [ - "0xebfcf7c0a1b09f6499e519a8d8bb85ce33cd539ec6cbd964e116cd74943ead1a" - ], - "data": "0x000000000000000000000000987e0a0692475bcc5f13d97e700bb43c1913effe0000000000000000000000000000000000000000000000000000000000000001", - "blockNumber": "0x4", - "transactionHash": "0xb29737963fd6768587ede453ab90ff7668115db16915a7833705ef134e793814", - "transactionIndex": "0x0", - "blockHash": "0x2dc21ffe5cf46b8babc3d3c4613a2b8b241013e9f39532a9c9161d81068aa9b6", - "logIndex": "0x0", - "removed": false, - "lifecycleEvent": true, - "relAddress1": null, - "relAddress2": null, - "relAddress3": null, - "relAddress4": null - } - ] -} -``` diff --git a/docs/_docs/api/sensitive-apis.md b/docs/_docs/api/sensitive-apis.md deleted file mode 100644 index 45f5c18af6..0000000000 --- a/docs/_docs/api/sensitive-apis.md +++ /dev/null @@ -1,30 +0,0 @@ ---- ---- -# Sensitive APIs - -Ten supports a subset of Ethereum's [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/). - -Some of these methods deal with sensitive information. For example, the response to an `eth_getBalance` request will -contain the balance of an account. An attacker could intercept this response to discover a user's balance. To avoid -this, the requests and responses for methods deemed sensitive are encrypted and decrypted by the -[wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension). To ensure a good user experience, this process is -invisible to the end user. - -This page details which JSON-RPC API methods are deemed sensitive, and the rules governing who is able to decrypt the -response to a given method call. - -## Sensitive JSON-RPC API Methods - -Of the methods above, the following are deemed sensitive, and their requests and responses are encrypted in transit: - -* `eth_call`: Response can only be decrypted by the owner of the account in the request's `from` field -* `eth_estimateGas`: Response can only be decrypted by the owner of the account in the request's `from` field -* `eth_getBalance`: Response can only be decrypted by: - * For account addresses: The owner of the account - * For contract addresses: The owner of the account that deployed the contract -* `eth_getLogs`: Response can only be decrypted by the owner of the account, and only includes logs relevant to that - account -* `eth_getTransactionByHash`: Response can only be decrypted by the signer of the transaction -* `eth_getTransactionCount`: Response can only be decrypted by the owner of the address -* `eth_getTransactionReceipt`: Response can only be decrypted by the signer of the transaction -* `eth_sendRawTransaction`: Response can only be decrypted by the signer of the transaction diff --git a/docs/_docs/assets/css/main.scss b/docs/_docs/assets/css/main.scss deleted file mode 100644 index cd12c38c33..0000000000 --- a/docs/_docs/assets/css/main.scss +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Only the main Sass file needs front matter (the dashes are enough) ---- - -@charset "utf-8"; - -@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin -@import "minimal-mistakes"; // main partials - -/* Set base font size for the site. */ -html { - font-size: 16px; -} - -/* Increase font size for nav bar from 0.75em default, and for title from 0.625em default */ -.sidebar p, .sidebar li, .site-subtitle { - font-size: 0.9em -} - -.build { - margin: 50px 0 !important; -} \ No newline at end of file diff --git a/docs/_docs/assets/images/1024px-Sunrise_Obscured_by_Clouds.jpg b/docs/_docs/assets/images/1024px-Sunrise_Obscured_by_Clouds.jpg deleted file mode 100644 index 8a27c5912f..0000000000 Binary files a/docs/_docs/assets/images/1024px-Sunrise_Obscured_by_Clouds.jpg and /dev/null differ diff --git a/docs/_docs/assets/images/Obscuro-white-strip.png b/docs/_docs/assets/images/Obscuro-white-strip.png deleted file mode 100644 index 6bbc2e0363..0000000000 Binary files a/docs/_docs/assets/images/Obscuro-white-strip.png and /dev/null differ diff --git a/docs/_docs/assets/images/RPC-Interfaces.png b/docs/_docs/assets/images/RPC-Interfaces.png deleted file mode 100644 index 3b11c03a81..0000000000 Binary files a/docs/_docs/assets/images/RPC-Interfaces.png and /dev/null differ diff --git a/docs/_docs/assets/images/build-with-encryption.jpg b/docs/_docs/assets/images/build-with-encryption.jpg deleted file mode 100644 index 81fa6c5c22..0000000000 Binary files a/docs/_docs/assets/images/build-with-encryption.jpg and /dev/null differ diff --git a/docs/_docs/assets/images/buildwithprivacy.png b/docs/_docs/assets/images/buildwithprivacy.png deleted file mode 100644 index 9ffb5f0c3a..0000000000 Binary files a/docs/_docs/assets/images/buildwithprivacy.png and /dev/null differ diff --git a/docs/_docs/assets/images/faucet-ack.png b/docs/_docs/assets/images/faucet-ack.png deleted file mode 100644 index 13048d99ca..0000000000 Binary files a/docs/_docs/assets/images/faucet-ack.png and /dev/null differ diff --git a/docs/_docs/assets/images/faucet-cmd.png b/docs/_docs/assets/images/faucet-cmd.png deleted file mode 100644 index 2697752086..0000000000 Binary files a/docs/_docs/assets/images/faucet-cmd.png and /dev/null differ diff --git a/docs/_docs/assets/images/faucet-done.png b/docs/_docs/assets/images/faucet-done.png deleted file mode 100644 index 2565b2724d..0000000000 Binary files a/docs/_docs/assets/images/faucet-done.png and /dev/null differ diff --git a/docs/_docs/assets/images/favicon.png b/docs/_docs/assets/images/favicon.png deleted file mode 100644 index fba0f3bd4b..0000000000 Binary files a/docs/_docs/assets/images/favicon.png and /dev/null differ diff --git a/docs/_docs/assets/images/guessing.png b/docs/_docs/assets/images/guessing.png deleted file mode 100644 index c464273be3..0000000000 Binary files a/docs/_docs/assets/images/guessing.png and /dev/null differ diff --git a/docs/_docs/assets/images/litepaper.pdf b/docs/_docs/assets/images/litepaper.pdf deleted file mode 100644 index 7774a4b1dc..0000000000 Binary files a/docs/_docs/assets/images/litepaper.pdf and /dev/null differ diff --git a/docs/_docs/assets/images/logo-small.png b/docs/_docs/assets/images/logo-small.png deleted file mode 100644 index 8289dafafe..0000000000 Binary files a/docs/_docs/assets/images/logo-small.png and /dev/null differ diff --git a/docs/_docs/assets/images/logo.png b/docs/_docs/assets/images/logo.png deleted file mode 100644 index 00a37d01ae..0000000000 Binary files a/docs/_docs/assets/images/logo.png and /dev/null differ diff --git a/docs/_docs/assets/images/metamask.png b/docs/_docs/assets/images/metamask.png deleted file mode 100644 index a6bd945e52..0000000000 Binary files a/docs/_docs/assets/images/metamask.png and /dev/null differ diff --git a/docs/_docs/assets/images/obscuro-full.png b/docs/_docs/assets/images/obscuro-full.png deleted file mode 100644 index 42b665bd5b..0000000000 Binary files a/docs/_docs/assets/images/obscuro-full.png and /dev/null differ diff --git a/docs/_docs/assets/images/obscuro-small.png b/docs/_docs/assets/images/obscuro-small.png deleted file mode 100644 index bb2801a72f..0000000000 Binary files a/docs/_docs/assets/images/obscuro-small.png and /dev/null differ diff --git a/docs/_docs/assets/images/obscuro-small_88x88.png b/docs/_docs/assets/images/obscuro-small_88x88.png deleted file mode 100644 index 0f5618cbb7..0000000000 Binary files a/docs/_docs/assets/images/obscuro-small_88x88.png and /dev/null differ diff --git a/docs/_docs/assets/images/obscuro-whitepaper-0-10-0.pdf b/docs/_docs/assets/images/obscuro-whitepaper-0-10-0.pdf deleted file mode 100644 index 7c1c49ee71..0000000000 Binary files a/docs/_docs/assets/images/obscuro-whitepaper-0-10-0.pdf and /dev/null differ diff --git a/docs/_docs/assets/images/obscuro-whitepaper-0-9.pdf b/docs/_docs/assets/images/obscuro-whitepaper-0-9.pdf deleted file mode 100644 index d1998bb45d..0000000000 Binary files a/docs/_docs/assets/images/obscuro-whitepaper-0-9.pdf and /dev/null differ diff --git a/docs/_docs/assets/images/setnewtarget.png b/docs/_docs/assets/images/setnewtarget.png deleted file mode 100644 index cbaaac4db6..0000000000 Binary files a/docs/_docs/assets/images/setnewtarget.png and /dev/null differ diff --git a/docs/_docs/assets/images/swimlanes.png b/docs/_docs/assets/images/swimlanes.png deleted file mode 100644 index a20f12f615..0000000000 Binary files a/docs/_docs/assets/images/swimlanes.png and /dev/null differ diff --git a/docs/_docs/community/contributions.md b/docs/_docs/community/contributions.md deleted file mode 100644 index f57fc0ad16..0000000000 --- a/docs/_docs/community/contributions.md +++ /dev/null @@ -1,25 +0,0 @@ ---- ---- -# Contributing to Ten - -Ten will evolve to be *the* solution for privacy on Ethereum through the strength and dedication of the Ten community. Together we'll make Ten the most community-driven project in crypto. - -As detailed in the [whitepaper](https://whitepaper.ten.xyz), Ten is powered by TEN, a native utility token that provides security to the Ten network while allowing holders to pay transaction fees. - -2% of tokens are set aside for early contributors. Each contributor's allocation is a percentage of their total contributions against the entire community contribution. - -For example, suppose you contribute work worth 10 'task points' and the community as a whole contributes 200 'task points'. In that case, you'll be allocated 5% of the contributor tokens or 0.1% of all available TEN tokens. These tokens will be held and distributed to you according to the vesting schedule detailed in the [tokenomics](https://github.com/ten-protocol/foundation/blob/main/token-utility-whitepaper.md). Upon vesting, they will be sent to your wallet. - -To help manage contributions, we use DeWork. It's a lot like Trello but crypto-native. The DeWork board has a load of suggested tasks. Anyone can add additional tasks and manage the lifecycle through to completion. -Anyone in the community can suggest a task that will benefit the project and community by adding it to the community suggestions group. - -Use the _Create Task_ form in DeWork to add a name, description (try and be as explicit as possible), existing tag (or add a new one if it's an entirely new category of work) and add a reviewer. Finally, think about task points. These translate roughly into hours taken to complete the task and the level of complexity. - -If there's already a task you think the community should prioritise, you can upvote the task by clicking the tiny up arrow on the task. - -Once they're part of the _To Do_ group, you can express interest and say why you think you'd be great for the task. This will be reviewed and assigned accordingly. -Some tasks, like competitions, accept multiple submissions. If there's a suggested task that you think you'd be great at and isn't currently in the 'To Do' group, reach out on Discord. - -Finally, nothing is more important than the community. We're here to help in any way. If you need guidance, want to discuss a task, ask questions, anything then reach out to anyone on the Obsuro Labs team on [Discord](https://discord.gg/7pkKv2Tyfn). - -Ready to go? Begin [here](https://app.dework.xyz/o/obscuro-6jhKTFlgOKNhKW1sG9Pbpt/p/community-co-7bsAxi8yDlzjUc3BV4hKyg?inviteId=de008bf8-d8f0-4429-8433-7f4d575e89d8) diff --git a/docs/_docs/cross-chain/bridge.md b/docs/_docs/cross-chain/bridge.md deleted file mode 100644 index 36e62d31d3..0000000000 --- a/docs/_docs/cross-chain/bridge.md +++ /dev/null @@ -1,68 +0,0 @@ ---- ---- -# The Standard Ten Bridge - -The standard Ten bridge is a trustless and decentralised asset bridge that uses a wrapped token mint and burn pattern. Under the hood it is based on the cross chain messaging protocol and exists entirely as a smart contract without the need of separate runnables or nodes. - -## Contract Addresses - -## Interacting with the contract - -Users interact with the bridge contract using either the `sendERC20` or `sendNative` functions. In order to send ERC20 tokens they need to be whitelisted. - -The pattern of interacting on both layers with `sendERC20` is as follows: - 1. Approve the bridge contract to act on your behalf for X amount of tokens using the standard ERC20 `approve()` method. - 2. Call `sendERC20` with the amount approved and the address of the recipient on the other side. - 3. Wait a tiny bit for the cross chain protocol to synchronize the state of the layers. - 4. Use your assets on the other layer. - -Interacting with `sendNative` does not require approving an allowance, but instead just add value to the transaction (or evm call). -The value received by the bridge contract during the execution of `sendNative` is what will be logged as transfer to the other layer. - -## Layer 1 To Layer 2 Specifics - -The `TenBridge.sol` contract is responsible for managing the layer 1 side of the bridge. It's the "bridge to Ten". -The `EthereumBridge.sol` contract is responsible for managing the layer 2 side of the bridge. It's the "bridge to Ethereum". - -In order to bridge tokens over they need to be whitelisted. **Initially only accounts with the admin role can whitelist tokens!** When the protocol has matured this whitelisting functionality will change. If you want your token to be whitelisted, get in touch with us through our discord. - -When an asset is whitelisted, the bridge internally uses the `publishMessage` call on the `MessageBus` contract which is deployed and exposed by the `ManagementContract` on layer 1. In the message that is published the bridge "tells" the other side of it, which resides on layer 2 that a token has been whitelisted. This in turn creates a wrapped version of the token on the other side. This version of the token can only be minted and burned by the layer 2 bridge. Notice that when the bridge "tells" its counter part, the message is not automatically delivered by Ten. To automate the process one needs to have a relayer in place that will do it automatically and a system in place that funds the gas costs of said relayer. As the network grows general purpose relayers might pop up. If you are developing or have developed such a relayer, contact us on discord to get it listed. - - * Minting allows to create fresh funds on the L2 when they get locked on L1. - * Burning allows to destroy supply on L2 in order to release it from the bridge on L1. - -The protocol to bridge assets using `mint`/`burn` is based on the `MessageBus`'s `publishMessage` too. The `TenBridge` tells the layer 2 that it has locked a certain amount of tokens and because of that address Y should receive the same amount of the wrapped token counterpart. This is when `mint` comes into play. On the other hand, the `EthereumBridge` burns tokens when received and tells the L1 that it has in fact done so. This is interpreted by the L1 smart contract as evidence to release locked funds. This message once again needs to be relayed for the process to work, but by a separate L1 relayer. - - -## Security - -The bridge inherits the `CrossChainEnabledTen` contract. It provides a modifier `onlyCrossChainSender` that can be attached to public smart contract functions in order to limit them. Normally you can limit a function to be called by `msg.sender`. With this new modifier you can limit a function to be called from the equivalent of `msg.crosschainsender`. In the `TenBridge` we limit the cross chain sender to the remote bridge only like this `onlyCrossChainSender(remoteBridgeAddress)`. - -The bridge initialization phase links the two bridge contracts (TenBridge, EthereumBridge) together. This linking is finalized when both contracts know the remote address on the opposite layer. Using those remote addresses, the bridges limit incoming `receiveAsset` messages to only be callable by the `CrossChainMessenger` contract sitting on the same layer. This `CrossChainMessenger` contract provides the necessary context to the bridge about the sender of the cross chain message. This allows to validate message is coming from the `remoteBridgeAddress`. The sender address is determined inside of `publishMessage` by taking the `msg.sender`. This `msg.sender` is put inside the metadata of each message. - -The result of this setup is that `receiveAsset` is only callable by having a valid cross chain message coming from the correct contract. Anything else will get rejected and cause the call to revert. - -The layer 2 bridge works much the same way as the L1 bridge and uses the `MessageBus` to facilitate communication. - -## Building Bridges - -The standard bridge was designed to work without requiring access to any private platform capabilities. This means that anyone can build a bridge using the same cross chain messaging API. There is no permissioning required to do so. We encourage you to build novel bridges and we'd love to assist you in any way possible. You are welcome at our discord if you have questions, need support or just want to discuss your bridge idea! - -## Interface - -This is the interface that can be used in order to interact with the bridge. - -`sendNative` is where you send raw ethereum as a call value. Said value received by the bridge will be forwarded to the `receiver`. -`sendERC20 ` is the previously described function that allows for moving tokens. - -```solidity -interface IBridge { - function sendNative(address receiver) external payable; - - function sendERC20( - address asset, - uint256 amount, - address receiver - ) external; -} -``` \ No newline at end of file diff --git a/docs/_docs/cross-chain/core-messaging-layer.md b/docs/_docs/cross-chain/core-messaging-layer.md deleted file mode 100644 index 4e8acd21b7..0000000000 --- a/docs/_docs/cross-chain/core-messaging-layer.md +++ /dev/null @@ -1,65 +0,0 @@ ---- ---- -# Ten Cross Chain Messaging - -Ten is equipped with a cross chain messaging protocol that enables sending and receiving messages across layers securely and in an entirely decentralized fashion. - -The core contract that provides this functionality is the `MessageBus`. It exists both on L1 and L2. In the L1 you can find it under the management contract whilst on the L2 it is created and managed by the protocol. - -## How It Works - -Users call the `publishMessage` function on the `MessageBus`. This function emits an event that records what message is being published, who is calling the method and some other bits. This event later on gets picked up by the protocol which ensures that the message is available on the counterpart `MessageBus`. - -When the message is made available, users can call the `verifyMessageFinalized` method in the `MessageBus` on the recipient layer. This method will return `true` if the message was indeed sent on the other layer as presented. Same `msg.sender`, same `payload`, same `nonce`. - -This allows to have a behaviour much like querying questions - **'Has the address 0xAAAA.. received 25WETH tokens on the bridge with address 0XAB0FF?'**. If the bridge on this address has called `publishMessage` saying **'I have received 25 WETH tokens with recipient 0xAAAA.`** the query will return true. - -When messages are published on the Ten layer (L2) the transport to L1 is done by the management contract upon rollup submission. Messages delivered however need to wait for the challenge period of the rollup before being considered final. This ensures that rollups along with the messages they carry can be challenged. This is the logical equivalent of challenge period for optimistic rollups. - -## Advanced capabilities - -The `MessageBus` contract provides a way to query non finalized delivered messages. Those are the messages that are still within the time window allowing for a rollup to be challenged. Furthermore the contract gives the time they will become final at. This is done using the `getMessageTimeOfFinality` method. - -Building on top of this message "preview" functionality allows for dApps that provide faster than challenge period finality. For example, a contract can provide the withdrawn amount from a bridge immediately with a fee. Doing this will transfer the rights for withdrawing the deposit to said party when the message is finalized. However providing such an early withdrawal at a fee exposes the provider to the risk of the rollup being challenged and proven invalid. This risk should be lower than average as it depends on submitting an invalid rollup which requires breaking SGX. - -## Security - -The protocol only listens to the events on the contract address that is bound to the management contract. Messages are bound to L1 blocks and in the event of reorganization the state will be recalculated. L2 messages are bound to L1 block hashes too, resulting in a system where rollups that update the state can only be applied to the correct fork. If there is a mismatch, the state update will be rejected by the management contract. - -The protocol controls the keys for the L2 contract. They are hidden within SGX and there are no codepaths that expose them externally. To create a transaction that publishes messages on the L2, one would need to break SGX in order to extract the private key controlling the `MessageBus` L2 contract. -However if one were to produce such a transaction, the code path would reject it automatically as it scans every external transaction. The protocol rejects external transactions that are signed by the hidden signer. This means there is no way to get such a transaction to be processed and even if local SGX is bypassed, validators will immediately pick it up. - - -## Interface - -Those are the current interfaces required to interact with the `MessageBus` contracts. If you encounter issues or have questions, please reach out on our discord. - -```solidity -interface Structs { - struct CrossChainMessage { - address sender; // The contract/address which called the publishMessage on the message bus. - uint64 sequence; // The sequential index of the message for the sending address. - uint32 nonce; // Provided by the smart contract. - uint32 topic; // Can be used to separate messages and provide basic versioning. - bytes payload; // The actual encoded message. - uint8 consistencyLevel; - } -} - -interface IMessageBus { - function publishMessage( - uint32 nonce, - uint32 topic, - bytes calldata payload, - uint8 consistencyLevel - ) external returns (uint64 sequence); - - function verifyMessageFinalized( - Structs.CrossChainMessage calldata crossChainMessage - ) external view returns (bool); - - function getMessageTimeOfFinality( - Structs.CrossChainMessage calldata crossChainMessage - ) external view returns (uint256); -} -``` \ No newline at end of file diff --git a/docs/_docs/testnet/Introduction.md b/docs/_docs/testnet/Introduction.md deleted file mode 100644 index 35f452edf3..0000000000 --- a/docs/_docs/testnet/Introduction.md +++ /dev/null @@ -1,15 +0,0 @@ ---- ---- -# Introducing Ten's first testnet, Evan's Cat -This section contains detailed on how to connect, build and deploy on Evan's Cat. Evan's Cat is designed with developers in mind. It provides the latest upgrades and tooling for developers to deploy and test their dApps. - -Evan's Cat can also be used by end users to help test Ten and test developer dApps. Evan's Cat does not focus on node operators. Support for node operators will arrive in the next version of testnet. - -Developers can expect frequent updates which will be communicated [here](https://docs.ten.xyz/testnet/changelog). The trade-off is that in the early days Testnet will have some sharp edges and unexpected surprises. More specifically, whilst Testnet is in its infancy: -* Ten Testnet will crash from time to time, and will frequently be updated with new features. -* When Ten Testnet restarts expect to lose everything. -* Ten Testnet code has not been optimised or audited yet. (Mainnet code will be audited prior to launch.) -* The [Ten Gateway](https://docs.ten.xyz/docs/tools-infrastructure/hosted-gateway) is still being improved. -* The decryption key is known by all allowing you to decrypt and view everything. This also allows the wider community to support you in development. - -All Ten code is under an open source licence. If you see something you think could be improved or reworked feel free to submit a PR in the [go-ten repo](https://github.com/ten-protocol/go-ten), or to let us know about your suggestion on [Discord](https://discord.com/channels/916052669955727371/945360340613484684). diff --git a/docs/_docs/testnet/deploying-a-smart-contract-programmatically.md b/docs/_docs/testnet/deploying-a-smart-contract-programmatically.md deleted file mode 100644 index cdf54eb92a..0000000000 --- a/docs/_docs/testnet/deploying-a-smart-contract-programmatically.md +++ /dev/null @@ -1,98 +0,0 @@ ---- ---- -# Deploying a Smart Contract to Ten Testnet Programmatically -The steps below demonstrate how to programmatically create a new contract on to Ten Testnet and interact with it via -call functions. The example uses [Python](https://www.python.org/) and [web3.py](https://web3py.readthedocs.io/en/stable/) -as a reference but the principles of usage will be the same in any web3 language implementation. - -A full working example can be seen in [deploying-a-smart-contract-programmatically.py](https://github.com/ten-protocol/go-ten/blob/main/docs/_docs/testnet/deploying-a-smart-contract-programmatically.py). -Usage of the example requires Python > 3.9.13, solc 0.8.15 and the web3, requests, and json modules. It is assumed solc -has been installed using homebrew and resides in `/opt/homebrew/bin/solc` and that the wallet extension is running on -the local host with default values `WHOST=127.0.0.1` and `WPORT=3000`. - -A walk through and explanation of the steps performed is given below; - -## Connect to the network and create a local private key -The [wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension/) acts as an HTTP server to mediate RPC requests. In the -below a connection is made on the wallet extension host and port, a private key is locally created and the associated -account stored for later usage. - -```python - w3 = Web3(Web3.HTTPProvider('http://%s:%d' % (WHOST, WPORT))) - private_key = secrets.token_hex(32) - account = w3.eth.account.privateKeyToAccount(private_key) - logging.info('Using account with address %s' % account.address) -``` - -## Request ETH from the faucet server for native ETH -An account needs gas to perform transactions on Ten, where gas is paid in native ETH. Requests of native ETH can be -made through a POST to the faucet server where the address is supplied in the data payload. -```python - headers = {'Content-Type': 'application/json'} - data = {"address": account.address} - requests.post(FAUCET_URL, data=json.dumps(data), headers=headers) -``` - -## Generate a viewing key, sign and post back to the wallet extension -The enclave encodes all communication to the wallet extension using viewing keys. HTTP endpoints exist in the wallet -extension to facilitate requesting a viewing key, and to sign and return it to the enclave. -```python - headers = {'Accept': 'application/json', 'Content-Type': 'application/json'} - - data = {"address": account.address} - response = requests.post('http://%s:%d/generateviewingkey/' % (WHOST, WPORT), data=json.dumps(data), headers=headers) - signed_msg = w3.eth.account.sign_message(encode_defunct(text='vk' + response.text), private_key=private_key) - data = {"signature": signed_msg.signature.hex(), "address": account.address} - response = requests.post('http://%s:%d/submitviewingkey/' % (WHOST, WPORT), data=json.dumps(data), headers=headers) -``` - -## Compile the contract and build the local deployment transaction -A contract can be compiled using solc and a transaction created for deploying the contract. Construction of the transaction -requires `gasPrice` and `gas` to be explicitly defined (the need to perform this will be removed in a later -release). An arbitrary `gasPrice` should be given e.g. the current price on the Ropsten test network. -```python - compiled_sol = compile_source(guesser, output_values=['abi', 'bin'], solc_binary='/opt/homebrew/bin/solc') - contract_id, contract_interface = compiled_sol.popitem() - bytecode = contract_interface['bin'] - abi = contract_interface['abi'] - contract = w3.eth.contract(abi=abi, bytecode=bytecode) - build_tx = contract.constructor(random.randrange(0, 100)).buildTransaction( - { - 'from': account.address, - 'nonce': w3.eth.getTransactionCount(account.address), - 'gasPrice': 1499934385, - 'gas': 720000, - 'chainId': 443 - } - ) -``` - -## Sign the transaction and send to the network -Using the account the transaction can be signed and submitted to the Ten Testnet. -```python - signed_tx = account.signTransaction(build_tx) - tx_hash = None - try: - tx_hash = w3.eth.sendRawTransaction(signed_tx.rawTransaction) - except Exception as e: - logging.error('Error sending raw transaction %s' % e) - return -``` - -## Wait for the transaction receipt -Once submitted the transaction receipt can be obtained in order to get the deployed contract address. -```python - tx_receipt = w3.eth.wait_for_transaction_receipt(tx_hash) - if tx_receipt.status == 0: - logging.error('Transaction receipt has failed status ... aborting') - return - else: - logging.info('Received transaction receipt') -``` - -## Create the contract using the abi and contract address -Once the transaction receipt is received function calls can be made against the contract. -```python - contract = w3.eth.contract(address=tx_receipt.contractAddress, abi=abi) - contract.functions.guess(guess).call() -``` diff --git a/docs/_docs/testnet/deploying-a-smart-contract-programmatically.py b/docs/_docs/testnet/deploying-a-smart-contract-programmatically.py deleted file mode 100644 index 7680ae8f0c..0000000000 --- a/docs/_docs/testnet/deploying-a-smart-contract-programmatically.py +++ /dev/null @@ -1,130 +0,0 @@ -import secrets -import requests -import json -import time -import logging -import random -from web3 import Web3 -from solcx import compile_source -from eth_account.messages import encode_defunct - -WPORT = 3000 -WHOST = '127.0.0.1' -LOWER = 0 -UPPER = 100 -FAUCET_URL = 'http://testnet-faucet.uksouth.azurecontainer.io/fund/eth' - -guesser = ''' -// SPDX-License-Identifier: MIT -pragma solidity 0.8; -contract Guesser { - address public owner; - uint256 public number; - constructor(uint256 _initialNumber) { - owner = msg.sender; - number=_initialNumber; - } - function guess(uint256 i) view public returns (int) { - if (inumber) return -1; - return 0; - } - function destroy() public { - require(msg.sender == owner, "You are not the owner"); - selfdestruct(payable(address(this))); - } -} -''' - -def guess(contract, max_guesses=100): - lower = LOWER - upper = UPPER - nguess = 0 - while True: - nguess += 1 - if nguess > max_guesses: - logging.warn("Exceeded guess count ... exiting") - return None - - guess = random.randrange(lower, upper) - ret = contract.functions.guess(guess).call() - if ret == 1: - logging.info("Guess is %d, need to go higher" % guess) - lower = guess + 1 - elif ret == -1: - logging.info("Guess is %d, need to go lower" % guess) - upper = guess - else: - logging.info("You've guessed the secret %s" % guess) - return guess - - -def run(): - # connect to the network, create a local private key and convert into the account - w3 = Web3(Web3.HTTPProvider('http://%s:%d' % (WHOST, WPORT))) - private_key = secrets.token_hex(32) - account = w3.eth.account.privateKeyToAccount(private_key) - logging.info('Using account with address %s' % account.address) - - # request native ETH from the faucet server - headers = {'Content-Type': 'application/json'} - data = {"address": account.address} - requests.post(FAUCET_URL, data=json.dumps(data), headers=headers) - - # generate a viewing key for this account, sign and post it to the wallet extension - headers = {'Accept': 'application/json', 'Content-Type': 'application/json'} - data = {"address": account.address} - response = requests.post('http://%s:%d/generateviewingkey/' % (WHOST, WPORT), data=json.dumps(data), headers=headers) - signed_msg = w3.eth.account.sign_message(encode_defunct(text='vk' + response.text), private_key=private_key) - - data = {"signature": signed_msg.signature.hex(), "address": account.address} - response = requests.post('http://%s:%d/submitviewingkey/' % (WHOST, WPORT), data=json.dumps(data), headers=headers) - - # compile the guessing game and build the deployment transaction - logging.info('Compiling the guessing game application') - compiled_sol = compile_source(guesser, output_values=['abi', 'bin'], solc_binary='/opt/homebrew/bin/solc') - contract_id, contract_interface = compiled_sol.popitem() - bytecode = contract_interface['bin'] - abi = contract_interface['abi'] - contract = w3.eth.contract(abi=abi, bytecode=bytecode) - build_tx = contract.constructor(random.randrange(LOWER, UPPER)).buildTransaction( - { - 'from': account.address, - 'nonce': w3.eth.getTransactionCount(account.address), - 'gasPrice': 1499934385, - 'gas': 720000, - 'chainId': 443 - } - ) - - # Sign the transaction and send to the network - logging.info('Signing and sending raw transaction') - signed_tx = account.signTransaction(build_tx) - tx_hash = None - try: - tx_hash = w3.eth.sendRawTransaction(signed_tx.rawTransaction) - except Exception as e: - logging.error('Error sending raw transaction %s' % e) - return - - # wait for the transaction receipt and check the status - logging.info('Waiting for transaction receipt') - tx_receipt = w3.eth.wait_for_transaction_receipt(tx_hash) - if tx_receipt.status == 0: - logging.error('Transaction receipt has failed status ... aborting') - return - else: - logging.info('Received transaction receipt') - - # construct the contract using the contract address - logging.info('Contract address is %s' % tx_receipt.contractAddress) - contract = w3.eth.contract(address=tx_receipt.contractAddress, abi=abi) - - # guess the number - logging.info('Starting guessing game') - guess(contract) - -if __name__ == '__main__': - logging.getLogRecordFactory() - logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s') - run() \ No newline at end of file diff --git a/docs/_docs/testnet/deploying-a-smart-contract.md b/docs/_docs/testnet/deploying-a-smart-contract.md deleted file mode 100644 index ab69a1778e..0000000000 --- a/docs/_docs/testnet/deploying-a-smart-contract.md +++ /dev/null @@ -1,51 +0,0 @@ ---- ---- -# Deploying a Smart Contract to Ten Testnet -Using the steps below you will add an extension to your MetaMask wallet so it can connect to Ten Testnet, then using Remix you will deploy your smart contract to Testnet. Remember there are no gas fees on Ten Testnet so you do not need to load your account with TEN tokens in advance. - -## Prerequisites -* [MetaMask](https://metamask.io/) wallet installed in your browser. -* A local copy of the [Ten MetaMask wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension/) - -## Prepare Your MetaMask Wallet for Ten Testnet -An essential part of how Ten provides full privacy is the encryption of communication between an Ten application and Ten nodes on the network. - -Follow the steps [here](https://docs.ten.xyz/wallet-extension/wallet-extension/) to configure and start the wallet extension and -generate a viewing key. - - -If you do not have the Ten wallet extension running, MetaMask will not be able to communicate with the Ten -Testnet. - -> **_TIP_** Every time you restart the wallet extension, you must generate a new viewing key. This is because the - private-key part of the viewing key is only held in memory and never persisted to disk, for security reasons. - -Your wallet is now configured for the Ten Testnet which allows you to view encrypted traffic for your wallet only. -You can now go ahead and deploy your smart contract to the Ten Testnet. - -## Deploy Your Smart Contract Using an IDE -1. Browse to the popular Solidity-compatible Integrated Development Environment called [Remix](https://remix.ethereum.org/). - - > **_TIP_** Take a look at the [Remix docs](https://remix-ide.readthedocs.io/en/latest/create_deploy.html) for guidance on using the IDE. - -1. Load your solidity smart contract into the Remix workspace. - -1. Compile your smart contract using the Remix Solidity Compiler. - -1. Log in to MetaMask and confirm you are connected to Ten Testnet network. The parameters for the Ten Testnet can be found [here](https://docs.ten.xyz/testnet/essentials/). - -1. In the _Deploy & Run Transactions_ section of Remix change the Environment to _Injected Web3_. This tells Remix to use the network settings currently configured in your MetaMask wallet, which in this case is the Ten Testnet. If the connection to Ten Testnet is successful you will see the text _Custom (443) network_ displayed under _Injected Web3_. - -1. Click the _Deploy_ button to deploy your smart contract to the Ten Testnet. - -1. MetaMask will automatically open and ask you to confirm the transaction. Click _Confirm_. - -1. Wait for your transaction to be confirmed. Notifications will be shown in MetaMask and Remix to indicate that the transaction was successful. - -Congratulations, your smart contract is now deployed to Ten Testnet! - -> **Be prepared to redeploy your smart contract to Ten Testnet often. The Testnet is likely to be restarted without warning!** As Testnet matures and new features are added it will become more and more stable, but in the early days do expect some turbulence. - -Because Ten provides full privacy, the details of your transaction are encrypted and only visible to you, as the holder of your wallet's private key. - -Now head over to the [TenScan page](https://docs.ten.xyz/testnet/tenscan/) to see how you can view the transaction details. diff --git a/docs/_docs/testnet/essentials.md b/docs/_docs/testnet/essentials.md deleted file mode 100644 index cb2ec55e3f..0000000000 --- a/docs/_docs/testnet/essentials.md +++ /dev/null @@ -1,48 +0,0 @@ ---- ---- -# Essential Information -Essential information, parameters and configuration settings for the Evan's Cat testnet. - -## Limitations on Evan's Cat -These are the key limitations to be aware of when developing for the Evan's Cat testnet: - -1. New nodes cannot be added. For now the number of Ten nodes is fixed. -1. Data revelation is not implemented yet. -1. Security is not fully implemented. Some keys are still hardcoded. -1. The decentralised bridge is limited to two hardcoded ERC20 tokens. -1. The Layer 1 is currently a hosted network. In the next iteration we'll connect Ten to an Ethereum testnet. -1. The "Wallet Extension" is not fully polished yet. You can expect a better UX as Ten develops - -## Connection to an Ten Node -- **RPC http address:** `erpc.sepolia-testnet.ten.xyz:80` -- **RPC websocket address:** `erpc.sepolia-testnet.ten.xyz:81` - -## Rollup Encryption/Decryption Key -The symmetric key used to encrypt and decrypt transaction blobs in rollups on the Ten Testnet: - -``` -bddbc0d46a0666ce57a466168d99c1830b0c65e052d77188f2cbfc3f6486588c -``` - -N.B. Decrypting transaction blobs is only possible on testnet, where the rollup encryption key is long-lived and -well-known. On mainnet, rollups will use rotating keys that are not known to anyone - or anything - other than the -Ten enclaves. - -## ERC20 Contracts -We have a couple of testnet ERC20 tokens (HOC & POC) that are automatically deployed with a static address every time -testnet is restarted. The bridging mechanism has been setup for these tokens so they can be deposited from and withdrawn -to their respective ERC20 contracts on the L1. - -Please contact us on [Discord](https://discord.gg/qA3FBYyZ) if you'd like some tokens to test with these contracts. - -Hocus (HOC): - -``` -0xf3a8bd422097bFdd9B3519Eaeb533393a1c561aC -``` - -Pocus (POC): - -``` -0x9802F661d17c65527D7ABB59DAAD5439cb125a67 -``` \ No newline at end of file diff --git a/docs/_docs/testnet/example-dapps.md b/docs/_docs/testnet/example-dapps.md deleted file mode 100644 index 821e52ce8a..0000000000 --- a/docs/_docs/testnet/example-dapps.md +++ /dev/null @@ -1,39 +0,0 @@ ---- ---- -# Example dApps on Testnet -Ten Testnet includes an example dApp to help you better understand how dApps capitalise on Ten's unique encryption features. - -## Number Guessing Game -[A number guessing game](http://tennet.github.io/sample-applications/number-guessing-game) is a simple way of showcasing the principles of encryption in Ten. The goal of the game is to guess a secret number. Each time an attempt is made an entrance fee of 1 unit of the token is paid (with 1x10^18 units making a single token). If a player correctly guesses the number the contract will pay out all of the accumulated entrance fees to them and reset itself with a new random number. - -Consider for a moment how a secret number could be created without divulging it. This is impossible in a transparent, decentralised ecosystem like Ethereum because when the secret number is generated by the smart contract it would be trivial to look up the internal state of the contract and see the secret number. OK, so let's imagine the internal state of the contract and therefore the secret number _is_ hidden, what happens when players start making their guesses? Using a block explorer to see the attempted guesses in plain view within the details of the transaction immediately provides new players with an unfair advantage and the game is ruined. - -Building the guessing game in Ten addresses both scenarios described above. The guessing game smart contract generates a random secret number when it is deployed. This number is never revealed to a player or node operator, or indeed anybody because it is generated within a Trusted Execution Environment. And when players make their guesses the transactions carrying the guesses are encrypted and therefore obscured in a block explorer. - -### How to Play -1. Start up the wallet extension. Follow instructions [here](https://docs.ten.xyz/wallet-extension/wallet-extension). -1. For the moment, the Guessing Game includes an ERC20 token (called OGG, short for Ten Guessing Game). This is partly because OGG is modified to have a built-in faucet: It allocates tokens to addresses as they make a request to allow other addresses to take tokens from their account. -1. If you want to see this balance in your wallet, you have to import a new Token with the address: ``0x5FbDB2315678afecb367f032d93F642f64180aa3`` -1. Browse to [the number guessing game](http://tennet.github.io/sample-applications/number-guessing-game). Check you see `Network ID: 443` at the top of the game window to confirm you are connected to Ten Testnet. -1. MetaMask will open and ask to connect your account. Click `Next` then click `Connect`. -1. Approve the payment of 1 or more token units to play the game (this will be added to the prize pool) by clicking the `Approve game fee` button. -1. MetaMask will ask for your account to sign a transaction specifying the Guess contract address as the approval delegate. This means that you're giving permission for the game to take the participation fee. Click `Confirm`. Once approved you will see a confirmation popup. Click `OK`. -1. Now you can play the game by typing your guess into the secret number field. Click the `Submit guess` button. -1. MetaMask will ask for your account to sign a contract interaction (your guess). Click `Confirm`. Note how the data presented by MetaMask to you is not yet encypted. That happens when MetaMask signs the transaction and sends it to the wallet extension "network", allowing the wallet extension to encrypt it before it leaves your computer. -1. Open MetaMask to check the progress of your guess transaction in the `Activity` tab of MetaMask. Wait a few moments for it to change from pending to complete. -1. The game should show you two messages, one confirming the success of the Approval transaction, and the second confirming the result of the guess attempt (whether correct, wrong, warmer or colder than the last guess). - -Once the guess transaction is completed you can check the guess transaction on TenScan: -1. In MetaMask click on the transaction to open it then click `Copy Transaction ID`. Open [TenScan](https://testnet.tenscan.io/). -1. Paste your copied transaction ID into the search box to find your individual guess transaction. Note how the transaction data visible to everyone is encrypted in the field `EncryptedTxBlob` and how (for now) the transaction is decrypted to allow developers to confirm correct behaviour of the network. -1. You can see your guess as the number at the right hand end of the `input` value in a hexadecimal format, e.g. a guess of 99 is shown as 63. - -### Known Issues and Limitations -1. When making a guess nothing appears to happen. MetaMask shows a failed transaction in the `Activity` tab for the guess submission. - * **Cause**: the guessing game has been reset between this and your previous guess. As a result your nonce is out of sequence. - * **Workaround**: reset your MetaMask account data in MetaMask using the option `Settings > Advanced > Reset Account` - -### Next Steps - -Now you have enjoyed playing the guessing game you are invited to make it even better! Go ahead and fork the guessing game code in this [GitHub repository](https://github.com/ten-protocol/number-guessing-game) and bring your own contributions to Ten Testnet. -Of course, you are free to [deploy any smart contract](https://docs.ten.xyz/testnet/deploying-a-smart-contract) to the testnet. diff --git a/docs/_docs/testnet/faucet.md b/docs/_docs/testnet/faucet.md deleted file mode 100644 index c3952b1c60..0000000000 --- a/docs/_docs/testnet/faucet.md +++ /dev/null @@ -1,35 +0,0 @@ ---- ---- -# Using the Testnet Token Faucet -Using the steps below you will request testnet ETH from the faucet available on the Ten Discord server. - -## Prerequisites -* Access to the [Ten Discord server](https://discord.gg/yQfmKeNzNd). -* (Optional) [MetaMask](https://metamask.io/) wallet installed in your browser. -* (Optional) A local copy of the [Ten MetaMask wallet extension](https://docs.ten.xyz/wallet-extension/wallet-extension/). - -## Requesting Testnet ETH -1. Make a note of your wallet address or copy it to your clipboard. -2. Open the [_faucet-requests_ channel](https://discord.gg/5qyj3qraaH) on Ten Discord. -3. Request ETH using the `/faucet` command. The faucet will credit 0.5 ETH by default: - ![faucet command](../../assets/images/faucet-cmd.png) -4. Provide your wallet address and hit Enter. The faucet will acknowledge your request: - ![faucet ack](../../assets/images/faucet-ack.png) -5. After a short period of time the faucet will confirm the Testnet ETH have been credited to your wallet: - ![faucet complete](../../assets/images/faucet-done.png) - -## Viewing Your Wallet Balance -To view the balance of your wallet you will need to establish a connection from your wallet to the Ten Testnet. An essential part of how Ten provides full privacy is the encryption of communication between an Ten application and Ten nodes on the network. As a result, you will need to use the wallet extension to allow your wallet to communication with the Ten Testnet. - -Use the steps [here](https://docs.ten.xyz/testnet/deploying-a-smart-contract/#prepare-your-metamask-wallet-for-ten-testnet) to prepare your MetaMask wallet for Ten Testnet. - -## Requesting Testnet ETH directly -In the event that you do not have access to Discord, or the faucet bot is not working, you can request ETH directly from -the faucet server using the below; - -1. Make a note of your wallet address or copy it to your clipboard. -2. Open a command shell and issue the below command, where `
` should be replaced with the value stored in your clipboard (e.g. `0x75Ad715443e1E2EBdaFA33ABB3B08443966019A6`). The faucet server will credit 0.5 ETH by default. -```bash -curl --location --request POST 'http://testnet-faucet.uksouth.azurecontainer.io/fund/eth' --header 'Content-Type: application/json' --data-raw '{ "address":"" }' -``` -3. After a short period of time the curl command will return `{"status":"ok"}` confirming ETH have been credited to your wallet. diff --git a/docs/_docs/testnet/obscuroscan.md b/docs/_docs/testnet/obscuroscan.md deleted file mode 100644 index 6ae93e3502..0000000000 --- a/docs/_docs/testnet/obscuroscan.md +++ /dev/null @@ -1,21 +0,0 @@ ---- ---- -# TenScan -TenScan is a blockchain explorer for the Ten Testnet - -Ten's equivalent of Etherscan. TenScan allows you to view the latest rollups and transactions on the Testnet, -as well as search for historical rollups and transactions. Its functionality will be expanded over time. - -## Usage - -1. Go to the [TenScan landing page](https://testnet.tenscan.io) -2. Observe the feed of latest rollups and transactions. Click on any rollup number or transaction hash to see the - details of the corresponding rollup and the L1 block where it was published -3. From the search bar in the top right, search for any rollup (using its number, e.g. `2453`) or transaction (using - its hash, which will start with `0x`, e.g. `0x5476edbf2c6cc1279d2334b2c80e26333d0eaca6c1807c7d8a2945b1a9d58f07`) - -## Decryption of Transaction Blobs - -Notice the _Decrypted transaction blob_ section for each rollup. This allows you to see the normally-encrypted -transactions in unencrypted plain text. This is a feature of Testnet aimed at helping you understand how Ten works, -and is only possible because Testnet uses a rollup encryption key that is long-lived and well-known. On Mainnet, -rollups will be encrypted with rotating keys that are not known to anyone, or anything, other than the Ten enclaves. diff --git a/docs/_docs/testnet/security.md b/docs/_docs/testnet/security.md deleted file mode 100644 index fe2d6e4e27..0000000000 --- a/docs/_docs/testnet/security.md +++ /dev/null @@ -1,10 +0,0 @@ ---- ---- -# Testnet Security - -The first Ten Testnet is focused on functionality and the User and Developer experience. - -Privacy features require special attention from the core and security audit team and will be finalised in a -future version of Testnet. - -As a user of the "Ten Testnet", do not expect the data you are loading to be 100% private. diff --git a/docs/_docs/testnet/starting-a-node.md b/docs/_docs/testnet/starting-a-node.md deleted file mode 100644 index 214088d870..0000000000 --- a/docs/_docs/testnet/starting-a-node.md +++ /dev/null @@ -1,84 +0,0 @@ ---- ---- -# Starting a node -How to start a node in the Evan's Cat testnet. - -## Requirements -- SGX enabled VM -- Docker - -## Steps -#### - Create an SGX enabled VM -Recommended Standard DC4s v2 (4 vcpus, 16 GiB memory) in Azure. - -#### - Install Docker & Go - -``` -sudo apt-get update \ - && curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh \ - && sudo snap refresh && sudo snap install --channel=1.20 go --classic -``` - -#### - Download Ten repo - - -Make sure to use the latest `` at https://github.com/ten-protocol/go-ten/tags. - -``` - git clone --depth 1 -b https://github.com/ten-protocol/go-ten.git /home/ten/go-ten -``` - -#### - Start Ten Node - -To start the ten node some information is required to populate the starting script. - -- (host_public_p2p_addr) The external facing address of the network. Where outside peers will connect to. Must be open to outside connections.`curl https://ipinfo.io/ip` provides the external IP. -- (private_key) Private Key to issue transactions into the Layer 1 -- (host_id) Public Key derived from the Private Key - -``` -go run /home/ten/go-ten/go/node/cmd \ - -is_genesis="false" \ - -node_type=validator \ - -is_sgx_enabled="true" \ - -host_id="0xD5C925bb6147aF6b6bB6086dC6f7B12faa1ab0ff" \ - -l1_host="testnet-eth2network.uksouth.azurecontainer.io" \ - -management_contract_addr="0x7d13152F196bDEebBD6CC53CD43e0CdAf97CbdE6" \ - -message_bus_contract_addr="0x426E82B481E2d0Bd6A1664Cccb24FFc76C0AD2f9" \ - -l1_start="0x190f89a5f68a880f1cd2a67e0ed17980c7f012503279a764acc78a538d7e188f" \ - -private_key="f19601351ab594b04f21bc1d577e03cc62290a5efea8198af8bdfb19dad035b3" \ - -sequencer_id="0xc272459070A881BfA28aB3E810f9b19E4F468531" \ - -host_public_p2p_addr="$(curl https://ipinfo.io/ip):10000" \ - -host_p2p_port=10000 \ - -enclave_docker_image="testnetobscuronet.azurecr.io/obscuronet/enclave:latest" \ - -host_docker_image="testnetobscuronet.azurecr.io/obscuronet/host:latest" \ - start -``` - -## - (Alternatively) Steps required to run a node on Alibaba SGX -Setup an Alibaba node to provide SGX to docker . - -Instance Type g7t - Linux Distro : Alibaba Linux 3 - -### Install docker -``` -sudo yum install -y yum-utils \ - && sudo yum-config-manager \ - --add-repo https://download.docker.com/linux/centos/docker-ce.repo \ - && sudo yum install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \ - && sudo systemctl start docker -``` - -### Install sgx -``` -yum install -y yum-utils && \ -yum-config-manager --add-repo \ -https://enclave-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/repo/alinux/enclave-expr.repo \ -&& yum install -y libsgx-ae-le libsgx-ae-pce libsgx-ae-qe3 libsgx-ae-qve \ -libsgx-aesm-ecdsa-plugin libsgx-aesm-launch-plugin libsgx-aesm-pce-plugin \ -libsgx-aesm-quote-ex-plugin libsgx-dcap-default-qpl libsgx-dcap-ql \ -libsgx-dcap-quote-verify libsgx-enclave-common libsgx-launch libsgx-pce-logic \ -libsgx-qe3-logic libsgx-quote-ex libsgx-ra-network libsgx-ra-uefi \ -libsgx-uae-service libsgx-urts sgx-ra-service sgx-aesm-service \ -&& yum install -y sgxsdk -``` \ No newline at end of file diff --git a/docs/_docs/testnet/tutorial.md b/docs/_docs/testnet/tutorial.md deleted file mode 100644 index 9e73ae7454..0000000000 --- a/docs/_docs/testnet/tutorial.md +++ /dev/null @@ -1,163 +0,0 @@ ---- ---- -# Getting Started -In this tutorial, you build your own Ten dApp from the start. This is an excellent way to experience a typical development process as you learn how Ten dApps are built, design concepts, tools and terminology. - -# Let's go - -In this tutorial, we'll build a 'Guessing Game' dApp that provides an introduction to the fundamentals of Ten and shows you how to: -- Set up your local Ethereum development environment for Ten. -- Use Ten concepts to develop a dApp. - -What is the *Guessing Game*? - -The Guessing Game is an example of a dApp that can only be built on Ten, and not on native Ethereum. - -You will build a dApp that demonstrates a basic Ten use case, a simple number guessing game. The dApp's smart contract generates a random secret number, which is never revealed to anyone, including node operators, developers or end-user because of the privacy provided by Ten. The goal of the game is to guess this number, and each time an attempt is made, an entrance fee of 1 token is paid. If a user correctly guesses the number, the contract will pay out all of the accumulated entrance fees to them and reset itself with a new random number. - -Without Ten, it would be possible to look up the internal state of the contract and cheat, and the game wouldn't work. - -The dApp has many of the features that you'd expect to find, including: -- Generating a random number known only to the dApp. -- Allow users to guess the numbers by depositing a token for each play. -- Colder/Warmer functionality to help guide users to the correct number. -- Events to alert users whether they have won or not. -- Track all player's guesses. -- Contract owner privileges to start and stop the game. - -# Set up your environment -- You'll need to install MetaMask following the instructions [here](https://metamask.io/) -- Then download and run the Ten Wallet extension following the instructions [here](https://docs.ten.xyz/wallet-extension/wallet-extension) -- Now connect MetaMask to the Ten testnet following the instructions [here](https://docs.ten.xyz/wallet-extension/configure-metamask) -- Finally, check you can open the Remix IDE by visiting the following URL in your browser https://remix.ethereum.org - -That's it. You're all set to start building your first dApp on Ten. - -## 1. To begin, we'll clone a template smart contract from Github through Remix by following these instructions - -#### Click on GitHub -![Step 1 screenshot](https://images.tango.us/workflows/57863807-6b96-4295-a7a1-42da1623f030/steps/919b227f-f1f5-4af3-aba1-7fb83576d505/8144f3f5-7855-4c83-86dd-c88e5476c367.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=874%3A594) - - -#### Paste "https://github.com/ten-protocol/tutorial/blob/main/number-guessing-game/contracts/Guess.sol" into input -![Step 2 screenshot](https://images.tango.us/workflows/57863807-6b96-4295-a7a1-42da1623f030/steps/4b3b212d-2518-4cc9-aab2-4befe128b38c/66a9a87d-0899-42d2-8f6a-98f204b25825.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=530%3A371) - - -#### Select Guess.sol to open it in the editor, and we're ready -![Step 1 screenshot](https://images.tango.us/workflows/bc1e6526-eb4e-4815-8690-412c37c1c5cb/steps/3a33b699-a3a9-42b5-b33a-2826f4516b08/faa2c399-1f01-4263-90d4-5d31f075e9bd.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=591%3A175) - - -# Let's code -Guess.sol is a Solidity file, and once we're done, it will contain everything we need for the Guessing Game. Inside the file you'll find the classic ERC-20 interface and a simple implementation named ERC20Basic representing OGG (Ten Guessing Game token). We'll use OGG as a means of entry to play and to generate the prize pool. - -There is also a skeleton contract called Guess inside Guess.sol, and this is what we'll be extending. The contract Guess will be written the same as any other Solidity contract in Ethereum. It'll run on the EVM and will exhibit the same behaviours. - -![Step 1 screenshot](https://images.tango.us/workflows/41b454a9-b560-4d60-8775-3e40c5bc1466/steps/74347d9b-e3fe-48aa-8e74-fecebd22fdfa/80231e65-e0be-4bf2-8150-521721745b2c.png?crop=focalpoint&fit=crop&fp-x=0.3145&fp-y=0.5909&fp-z=3.3270&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=2307%3A1244) - -Let's start by defining the key variables we'll need for the game. One is to store the secret number that only the contract knows about, and another containing the ERC-20 contract. - -``` - uint8 private _target - IERC20 public erc20 -``` -Upon seeing this, you might think, hang on, I can see *_target* is set to private, but so what? Private variables in Ethereum don't really mean they're private, just that they can't be accessed or modified by other smart contracts. And you're right, that's the case in Ethereum. But in Ten, private variables *really* are private (unless you explicitly decide to reveal them!). This is because all contracts and contract data is encrypted and only accessible within enclaves. - -Our variables should now look like this -![Step 1 screenshot](https://images.tango.us/workflows/dc61d575-7eea-457c-bdfe-8edccf79b366/steps/3d9b387b-a492-4096-aa8a-1d50084be0d5/6d08adce-70d2-4203-8d18-c09999536553.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=413%3A131) - - -Next, let's think about how we'll instantiate this contract. We'll need to: -- create an instance of the ERC-20 contract to manage and hold OGG tokens -- generate a secret random number - - -Let's extend to the constructor to include these: - -![Step 2 screenshot](https://images.tango.us/workflows/a8278591-dc09-4e26-97a2-b30776f86179/steps/58146527-d6d4-47c4-a796-cc0b3b4909db/56afa096-9f71-49a0-a85d-94ba3ecc56a4.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=410%3A117) - - -Now let's write our function to generate the random number and secretly store it within the contract - -![Step 1 screenshot](https://images.tango.us/workflows/a8278591-dc09-4e26-97a2-b30776f86179/steps/8b18e51b-b4da-43e6-a752-eea0cc550791/009e7455-a298-4b66-808b-39080f30af24.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=864%3A211) - - -This isn't great as although the number is arguably random, it's not random to anyone who knows how it's generated and how to measure the inputs when the function is called. We are working on something better. Watch this space! - -Okay, so right now, we should have the following: -- a constructor that initializes the contract -- a way to calculate the random number to be guessed - -We now need to add the ability for a player to make an actual guess. But before we do that, we have not thought about the range we might want numbers to appear in. This would allow us to set the difficulty for any particular game. So let's do that now. - -Extend the constructor to accept a range int and create a variable for it, so we have something that looks like this - -![Step 1 screenshot](https://images.tango.us/workflows/8f7ef3ef-091f-4b5d-9017-d041449139ae/steps/43aff627-6025-42c1-8e1a-654761d01b90/c3fc2de4-e9fa-4d31-b1a8-abe5331e0ec9.png?crop=focalpoint&fit=crop&fp-x=0.2957&fp-y=0.3023&fp-z=4.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=2307%3A1244) - -And we can change our random number function to adhere to the range by including the modulo operator %, like this: - -![Step 1 screenshot](https://images.tango.us/workflows/3365689e-af3c-4c4c-9a8a-890f9e1fa4c5/steps/34d0f0b0-799f-41cb-b9ff-ff475af306cd/0ed09dad-0b61-4fd3-9bf8-626a897ac050.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=850%3A198) - - -Onto the actual guess! We'll need the function to capture several things: -- Check the player has enough tokens to play -- Allow the player to transfer a token to the prize pool to pay for a guess -- Handle the player winning -- Handle the player not winning - -Let's go ahead and create a function called *attempt* that takes as input a guess - -![Step 1 screenshot](https://images.tango.us/workflows/560f6b90-fcc4-4c59-8a27-bf8a5fc08370/steps/bf2c1e4e-8323-4b89-85fd-e35805aff122/e6271350-4eb1-41d5-9b3d-afaf3058040a.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=473%3A100) - -We already have the OGG tokens defined, so we can use this to check funds with - -``` - require(erc20.allowance(msg.sender, address(this)) >= 1 ether, "Check the token allowance."); -``` -This assumes it costs 1 token per play. - -Next, we transfer the funds for each play with something like - -``` -erc20.transferFrom(msg.sender, address(this), 1 ether); -``` - -Next, let's add code that checks if the guess is correct or not. If the guess is correct, call the ERC-20 function to transfer all the funds in the contract and reset the game by calling _setNewTarget(). - -If it's not correct, we do nothing. For example, your code might look something like this: - -![Step 1 screenshot](https://images.tango.us/workflows/7073e589-7d79-491f-b4f1-27db2eb144c1/steps/ad4b9d9a-5793-420f-b21c-3a22ae8e83b5/b016b98e-203a-4362-9c14-6ff2928b9ba8.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=879%3A246) - - -This works. You now have an Ten contract that will let players play the guessing game. But it's not very good. So how do players know if they've won or not? We need events! - -In Ethereum, events are typically written to the event log that is viewable by everyone. In Ten, events are viewable only to those they're intended for. This is done by encrypting events with a key that is known only to the intended recipient. This is handled automatically for the recipient through the Wallet Extension. - -So let's go ahead and start adding in some events. First, we'll need to emit events letting a player know after they've played whether they have won or not. - -Events in Ten look exactly like events in any other EVM-based platform. All the complexity of ensuring privacy is abstracted away. So let's go ahead and define two new events in our contract. - -``` -event Correct(address indexed player, uint8 guess, uint prize); -event Incorrect(address indexed player, uint8 guess, uint prize); -``` - -Where **prize** represents the current prize pool so we can remind the player of what they're playing for. - -With these events in place, we can now call them accordingly within our attempt function, so we end up with something like this: - -![Step 1 screenshot](https://images.tango.us/workflows/263b9f82-3d6e-46d1-908f-952591a206d8/steps/cb679525-fb5f-4cae-991a-02285beee941/765986b3-1999-4814-a6ac-89bb6d22488d.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=870%3A269) - - -Before we move on, we've seen how we can keep things private (hint: all of the above is private!). What about if there are things we want to intentionally make public? For example, it makes sense for the current prize pool to be public, so let's go ahead and explore that. It's straightforward. All you do is create a public view that returns something - precisely the same as any other EVM contract! - -Our function to return the prize pool is: - -![Step 1 screenshot](https://images.tango.us/workflows/74ec7481-8c33-401f-8476-07c777e7cd3d/steps/d4a753b9-f507-4f6c-b080-40587ec82c00/8ffdc581-6e95-40bb-9c11-d3fa0ef01d84.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&fp-z=1.0000&w=1200&mark-w=0.2&mark-pad=0&mark64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmsucG5n&ar=518%3A87) - -And that's it! Congratulations on writing your first Ten smart contract! - -You can now go ahead and deploy the contract following the instructions [here](https://docs.ten.xyz/testnet/deploying-a-smart-contract) - -With that done, why not have a go at extending the contract to include warmer/colder functionality. Then, when a returning player plays again for the same again, if their new guess is closer to the previous guess, they're told they're *warmer*, and if it's further, they're *colder*. - - diff --git a/docs/_docs/wallet-extension/configure-metamask.md b/docs/_docs/wallet-extension/configure-metamask.md deleted file mode 100644 index b01a98d8d6..0000000000 --- a/docs/_docs/wallet-extension/configure-metamask.md +++ /dev/null @@ -1,14 +0,0 @@ ---- ---- -# Configuring MetaMask - -To keep data encrypted between MetaMask and the Ten network, MetaMask needs to be configured to point to the local Wallet Extension as follows: - -* Network Name: Ten Testnet -* New RPC URL: `http://127.0.0.1:3000/` -* Chain ID: 443 -* Currency Symbol: ETH - -It should look like this: - -![MetaMask configured](../../assets/images/metamask.png) \ No newline at end of file diff --git a/docs/_docs/wallet-extension/wallet-extension.md b/docs/_docs/wallet-extension/wallet-extension.md deleted file mode 100644 index 97829ea09f..0000000000 --- a/docs/_docs/wallet-extension/wallet-extension.md +++ /dev/null @@ -1,82 +0,0 @@ ---- ---- -# The Ten Wallet Extension - -The wallet extension is the Ten component that ensures that sensitive information in RPC requests between client -applications and the Ten enclave, such as balances or transactions, cannot be seen by third parties. It -achieves this goal without requiring any custom wallet software or application code changes. Private keys for Ten -addresses may be stored in [MetaMask](https://metamask.io/), for example, and the Wallet Extension will act as a bridge -between MetaMask and an Ten host without ever knowing your wallet's private keys itself. - -The wallet extension performs two functions: - -* Encrypting outgoing RPC requests using the public key of the Ten enclave. -* Decrypting incoming RPC responses for [privacy-sensitive requests](https://docs.ten.xyz/api/sensitive-apis/) (e.g. `eth_getBalance`, - `eth_call` and `eth_getTransactionReceipt`) using an address-specific _viewing key_. - -_Viewing keys_ are ephemeral public keys generated by the wallet extension. They are sent to the enclave, accompanied -by a signature proving the viewing key was generated by a specific address, and are used to securely encrypt messages -from the enclave back to the wallet extension. The corresponding private key is stored locally by the wallet extension -to securely decrypt the incoming messages. - -The wallet extension should be run locally by the user, such that no sensitive data leaves the client's machine -unencrypted. If the data is not particularly sensitive, it can also be run in another trusted location. - -This diagram shows how Wallet Extension fits into the Ten workflow as a bridge between standard ethereum ecosystem -tools. -![Diagram showing wallet extension as an RPC bridge for common Ethereum tooling](../../assets/images/RPC-Interfaces.png) - -## Pre-requisites - -* [MetaMask](https://metamask.io/) - * MetaMask is required to create a signature over each new viewing key. Other signers are not currently supported. -* [Go](https://go.dev/) - * Required if building the binary locally. - -## Usage - -1. The wallet extension can be downloaded from the [Ten release page](https://github.com/ten-protocol/go-ten/releases) - where the binary is built for the Linux, MacOS and Windows platforms. Download the binary for the latest release and - rename to `wallet_extension`. Note that on MacOS the binary has not been signed and notarised yet - see - [apple support](https://support.apple.com/en-gb/HT202491) for steps to over-write this. The binary can be compiled by - cloning the [Ten repository](https://github.com/ten-protocol/go-ten) and running the following command from the - root of the repository: - - ``` - cd tools/walletextension/main && go build -o wallet_extension . - ``` - - This will build the wallet extension binary under `tools/walletextension/main/wallet_extension`. Note that the - recommended approach is to download from the release page when running against Testnet. - -2. Open a command prompt and start the wallet extension by running the `wallet_extension` binary. The wallet extension - supports the following flags: - - * `port` (default: `3000`): The local port on which to serve the wallet extension. - * `portWS` (default: `3001`): The local port on which to handle websocket requests. - * `nodeHost` (default: `erpc.sepolia-testnet.ten.xyz`): The Ten node for the RPC connection. - * `nodePortHTTP` (default: `80`): The Ten node's HTTP RPC port. - * `nodePortWS` (default: `81`): The Ten node's websockets RPC port. - * `logPath` (default: `wallet_extension_logs.txt`): The path for the wallet extension's logs. - * `databasePath` (default: `~/.obscuro/getway_database`): The path to use for the wallet extension's - database. - - The wallet extension is now listening on the specified host and port. For the remainder of this document, we'll - assume that the default ports of `3000` and `3001` were selected. - -3. Sign in to MetaMask and add the Ten Testnet network following the instructions [here](https://docs.ten.xyz/wallet-extension/configure-metamask). - -4. At this stage, no viewing key has been set up. The enclave will refuse to respond to sensitive RPC requests such - as `eth_getBalance`, `eth_call` and `eth_getTransactionReceipt`. As a result, your balance in MetaMask will not be - accurately updated until you have a viewing key. - -5. Visit `http://localhost:3000/viewingkeys/` to generate a new viewing key, and sign the viewing key when prompted by - MetaMask. Responses to sensitive RPC requests will now be encrypted with the viewing key and decrypted - automatically by the wallet extension. Your balance in MetaMask will be set to 0 at the beginning. - You can get testnet ETH from [faucet](https://docs.ten.xyz/testnet/faucet/) (you may need to switch to another network and back again to force MetaMask to refresh balance). - - Once a viewing key is generated it will be persisted across restarts of the wallet extension, saved in the user home space under `~/.obscuro/wallet_extension_persistence`. - -# Auditing the source - -The source code for the wallet extension can be found [here](https://github.com/ten-protocol/go-ten/tree/main/tools/walletextension). diff --git a/docs/_docs/what-is-obscuro/encrypted-ethereum.md b/docs/_docs/what-is-obscuro/encrypted-ethereum.md deleted file mode 100644 index 59dc92066e..0000000000 --- a/docs/_docs/what-is-obscuro/encrypted-ethereum.md +++ /dev/null @@ -1,8 +0,0 @@ ---- ---- -# Encrypted Ethereum -_The full Litepaper is available to view [here](https://ten.xyz/litepaper)._ - -Ten brings to Ethereum what HTTPS brought to Web 2 leading to an explosion in applications and usage. Ten achieves this goal by building an encrypted Ethereum Layer 2, leveraging the consensus and security of Ethereum. - -As a Layer 2 solution, Ten enables faster and more cost-effective transactions while inheriting the security of Ethereum. Ten ensures that all inputs, contract state, and execution processes are encrypted, providing a Web2 experience with no changes to the user or developer experience. Ten revolutionizes Web3 applications, including gaming, DeFi 2.0, dark pool trading, sealed auctions, private agreements, identity, and more. \ No newline at end of file diff --git a/docs/_docs/what-is-obscuro/privacy-matters.md b/docs/_docs/what-is-obscuro/privacy-matters.md deleted file mode 100644 index 8cb7d00d58..0000000000 --- a/docs/_docs/what-is-obscuro/privacy-matters.md +++ /dev/null @@ -1,18 +0,0 @@ ---- ---- -# Privacy -_The full Litepaper is available to view [here](https://ten.xyz/litepaper)._ - -The privacy Ten provides can be split into transactional and computational privacy. - -## Transactional privacy -Transactional privacy is the ability to maintain privacy over transactions on the L2. For example, keeping user token balances, participants of a transaction and the amounts transferred private is the main use of transactional privacy. - -This is the problem that ZKP-based privacy protocols such as Z-Cash solve. - -Ten provides transactional privacy and keeps token contract calls entirely confidential by encrypting transactions from the point of origination, the wallet. - -## Computational privacy -In addition to transactional privacy, Ten also provides a much deeper form of privacy known as computational privacy. This is complete and absolute privacy over the entire computation of smart contracts and the network. - -With computational privacy, it's possible to keep inputs and outputs from contracts private and any logic executed within the smart contract. This opens up huge possibilities across DeFi, NFTs, Gaming, DAOs, the Metaverse and things yet to come. \ No newline at end of file diff --git a/docs/_docs/what-is-obscuro/quick-start.md b/docs/_docs/what-is-obscuro/quick-start.md deleted file mode 100644 index 0016241ade..0000000000 --- a/docs/_docs/what-is-obscuro/quick-start.md +++ /dev/null @@ -1,29 +0,0 @@ ---- ---- -# Developer quick start - -The only difference between an Ten and an Ethereum (or Arbitrum) dApp is that on Ten you can hide the internal -state of the contract. - -The most obvious example is that an ERC20 token deployed on Ten will not respond to balance requests unless you are -the account owner. - -In Ten, the internal node database is encrypted, and the contract execution is also encrypted inside the TEE. -The calls to [getStorageAt](https://docs.alchemy.com/reference/eth-getstorageat) are disabled, so all data access -requests will be performed through view functions which are under the control of the smart contract developer. - -Nobody (which includes node operators and the sequencer) can access the internal state of a contract. - -**The only thing you have to do when porting a dApp to Ten is to add a check in your view functions comparing -the `tx.origing` and `msg.sender` against the accounts allowed to access that data.** - -The snippet below illustrates this for an [ERC20 token](https://github.com/ten-protocol/sample-applications/blob/main/number-guessing-game/contracts/ERC20.sol#L25). - -```solidity -function balanceOf(address tokenOwner) public view override returns (uint256) { - require(tx.origin == tokenOwner || msg.sender == tokenOwner, "Only the token owner can see the balance."); - return balances[tokenOwner]; -} -``` - -_Note that this works because in Ten all calls to view functions are authenticated._ \ No newline at end of file diff --git a/docs/_docs/what-is-obscuro/technology.md b/docs/_docs/what-is-obscuro/technology.md deleted file mode 100644 index 5bc631f9d7..0000000000 --- a/docs/_docs/what-is-obscuro/technology.md +++ /dev/null @@ -1,7 +0,0 @@ ---- ---- -# Technology - -Ten leverages a pragmatic technology for encrypting the ledger, Trusted Execution Environments (TEEs). TEEs provide robust confidentiality guarantees with certainty over the code running. They allow Ten to offer smart contracts, decentralisation, scalability and encryption in a way not seen before. - -Ten brings encryption to the Ethereum Mainnet, leveraging the liveness and availability of the Mainnet for ledger integrity. Uniquely, Ten’s Proof of Block Inclusion (POBI) protocol ensures Ten's confidential roll-ups have consensus in a decentralized Ten network. \ No newline at end of file diff --git a/docs/_docs/what-is-obscuro/user-experience.md b/docs/_docs/what-is-obscuro/user-experience.md deleted file mode 100644 index 7480267188..0000000000 --- a/docs/_docs/what-is-obscuro/user-experience.md +++ /dev/null @@ -1,7 +0,0 @@ ---- ---- -# User Experience - -The design of Ten ensures that existing Ethereum dApps can move over to Ten for virtually no cost. Any developer familiar with Ethereum can build encrypted dApps on Ten that benefit from the adoption, legitimacy, security, developer tooling and liquidity of the entire Ethereum ecosystem. - -End-users can continue to use MetaMask or their favourite Ethereum wallet. Interacting with an Ten application is the same as interacting with any Ethereum application. With a seamless user and developer experience, Ten changes the paradigm around encryption for web3. diff --git a/docs/android-chrome-192x192.png b/docs/android-chrome-192x192.png deleted file mode 100644 index 24d48338d6..0000000000 Binary files a/docs/android-chrome-192x192.png and /dev/null differ diff --git a/docs/android-chrome-256x256.png b/docs/android-chrome-256x256.png deleted file mode 100644 index 546fb6cfd4..0000000000 Binary files a/docs/android-chrome-256x256.png and /dev/null differ diff --git a/docs/apple-touch-icon.png b/docs/apple-touch-icon.png deleted file mode 100644 index 95ee7fe611..0000000000 Binary files a/docs/apple-touch-icon.png and /dev/null differ diff --git a/docs/browserconfig.xml b/docs/browserconfig.xml deleted file mode 100644 index b3930d0f04..0000000000 --- a/docs/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #da532c - - - diff --git a/docs/docs~7a8c484d48d2927d7ea044f7ff4e26ca30ab6454 b/docs/docs~7a8c484d48d2927d7ea044f7ff4e26ca30ab6454 deleted file mode 100644 index 8b13789179..0000000000 --- a/docs/docs~7a8c484d48d2927d7ea044f7ff4e26ca30ab6454 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png deleted file mode 100644 index 5c074597de..0000000000 Binary files a/docs/favicon-16x16.png and /dev/null differ diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png deleted file mode 100644 index ffbb7c1c36..0000000000 Binary files a/docs/favicon-32x32.png and /dev/null differ diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 7cd351478b..0000000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/gemfile b/docs/gemfile deleted file mode 100644 index 4e1219f710..0000000000 --- a/docs/gemfile +++ /dev/null @@ -1,44 +0,0 @@ -source "https://rubygems.org" -# Hello! This is where you manage which Jekyll version is used to run. -# When you want to use a different version, change it below, save the -# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: -# -# bundle exec jekyll serve -# -# This will help ensure the proper Jekyll version is running. -# Happy Jekylling! -# gem "jekyll", "~> 4.2.2" -# This is the default theme for new Jekyll sites. You may change this to anything you like. -gem "minima", "~> 2.5" -# If you want to use GitHub Pages, remove the "gem "jekyll"" above and -# uncomment the line below. To upgrade, run `bundle update github-pages`. - gem "github-pages", group: :jekyll_plugins -# If you have any plugins, put them here! -group :jekyll_plugins do - gem "jekyll-sitemap" - gem "jekyll-seo-tag" - gem "jekyll-paginate" - gem "jekyll-include-cache" - gem "jekyll-titles-from-headings" - gem "jekyll-relative-links" - gem "jekyll-gist" - gem "minimal-mistakes-jekyll" - gem "jekyll-remote-theme" - gem "faraday-retry" -end - -# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem -# and associated library. -platforms :mingw, :x64_mingw, :mswin, :jruby do - gem "tzinfo", "~> 1.2" - gem "tzinfo-data" -end - -# Performance-booster for watching directories on Windows -gem "wdm", "~> 0.1.0", :platforms => [:mingw, :x64_mingw, :mswin] - -# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem -# do not have a Java counterpart. -gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] - -gem "webrick", "~> 1.7" diff --git a/docs/gemfile.lock b/docs/gemfile.lock deleted file mode 100644 index 8af788618e..0000000000 --- a/docs/gemfile.lock +++ /dev/null @@ -1,298 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (6.0.5) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.11.1) - colorator (1.1.0) - commonmarker (0.23.5) - concurrent-ruby (1.1.10) - dnsruby (1.61.9) - simpleidn (~> 0.1) - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - ethon (0.15.0) - ffi (>= 1.15.0) - eventmachine (1.2.7) - execjs (2.8.1) - faraday (2.3.0) - faraday-net_http (~> 2.0) - ruby2_keywords (>= 0.0.4) - faraday-net_http (2.0.3) - faraday-retry (2.0.0) - faraday (~> 2.0) - ffi (1.15.5) - ffi (1.15.5-x64-mingw-ucrt) - ffi (1.15.5-x64-unknown) - forwardable-extended (2.6.0) - gemoji (3.0.1) - github-pages (226) - github-pages-health-check (= 1.17.9) - jekyll (= 3.9.2) - jekyll-avatar (= 0.7.0) - jekyll-coffeescript (= 1.1.1) - jekyll-commonmark-ghpages (= 0.2.0) - jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.15.1) - jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.13.0) - jekyll-include-cache (= 0.2.1) - jekyll-mentions (= 1.6.0) - jekyll-optional-front-matter (= 0.3.2) - jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.3.0) - jekyll-redirect-from (= 0.16.0) - jekyll-relative-links (= 0.6.1) - jekyll-remote-theme (= 0.4.3) - jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.8.0) - jekyll-sitemap (= 1.4.0) - jekyll-swiss (= 1.0.0) - jekyll-theme-architect (= 0.2.0) - jekyll-theme-cayman (= 0.2.0) - jekyll-theme-dinky (= 0.2.0) - jekyll-theme-hacker (= 0.2.0) - jekyll-theme-leap-day (= 0.2.0) - jekyll-theme-merlot (= 0.2.0) - jekyll-theme-midnight (= 0.2.0) - jekyll-theme-minimal (= 0.2.0) - jekyll-theme-modernist (= 0.2.0) - jekyll-theme-primer (= 0.6.0) - jekyll-theme-slate (= 0.2.0) - jekyll-theme-tactile (= 0.2.0) - jekyll-theme-time-machine (= 0.2.0) - jekyll-titles-from-headings (= 0.5.3) - jemoji (= 0.12.0) - kramdown (= 2.3.2) - kramdown-parser-gfm (= 1.1.0) - liquid (= 4.0.3) - mercenary (~> 0.3) - minima (= 2.5.1) - nokogiri (>= 1.13.4, < 2.0) - rouge (= 3.26.0) - terminal-table (~> 1.4) - github-pages-health-check (1.17.9) - addressable (~> 2.3) - dnsruby (~> 1.60) - octokit (~> 4.0) - public_suffix (>= 3.0, < 5.0) - typhoeus (~> 1.3) - html-pipeline (2.14.2) - activesupport (>= 2) - nokogiri (>= 1.4) - http_parser.rb (0.8.0) - i18n (0.9.5) - concurrent-ruby (~> 1.0) - jekyll (3.9.2) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (~> 0.7) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (>= 1.17, < 3) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - jekyll-avatar (0.7.0) - jekyll (>= 3.0, < 5.0) - jekyll-coffeescript (1.1.1) - coffee-script (~> 2.2) - coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.4.0) - commonmarker (~> 0.22) - jekyll-commonmark-ghpages (0.2.0) - commonmarker (~> 0.23.4) - jekyll (~> 3.9.0) - jekyll-commonmark (~> 1.4.0) - rouge (>= 2.0, < 4.0) - jekyll-default-layout (0.1.4) - jekyll (~> 3.0) - jekyll-feed (0.15.1) - jekyll (>= 3.7, < 5.0) - jekyll-gist (1.5.0) - octokit (~> 4.2) - jekyll-github-metadata (2.13.0) - jekyll (>= 3.4, < 5.0) - octokit (~> 4.0, != 4.4.0) - jekyll-include-cache (0.2.1) - jekyll (>= 3.7, < 5.0) - jekyll-mentions (1.6.0) - html-pipeline (~> 2.3) - jekyll (>= 3.7, < 5.0) - jekyll-optional-front-matter (0.3.2) - jekyll (>= 3.0, < 5.0) - jekyll-paginate (1.1.0) - jekyll-readme-index (0.3.0) - jekyll (>= 3.0, < 5.0) - jekyll-redirect-from (0.16.0) - jekyll (>= 3.3, < 5.0) - jekyll-relative-links (0.6.1) - jekyll (>= 3.3, < 5.0) - jekyll-remote-theme (0.4.3) - addressable (~> 2.0) - jekyll (>= 3.5, < 5.0) - jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) - rubyzip (>= 1.3.0, < 3.0) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) - jekyll-seo-tag (2.8.0) - jekyll (>= 3.8, < 5.0) - jekyll-sitemap (1.4.0) - jekyll (>= 3.7, < 5.0) - jekyll-swiss (1.0.0) - jekyll-theme-architect (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.6.0) - jekyll (> 3.5, < 5.0) - jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.0) - jekyll-theme-slate (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.3) - jekyll (>= 3.3, < 5.0) - jekyll-watch (2.2.1) - listen (~> 3.0) - jemoji (0.12.0) - gemoji (~> 3.0) - html-pipeline (~> 2.2) - jekyll (>= 3.0, < 5.0) - kramdown (2.3.2) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - liquid (4.0.3) - listen (3.7.1) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.3.6) - minima (2.5.1) - jekyll (>= 3.5, < 5.0) - jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) - minimal-mistakes-jekyll (4.24.0) - jekyll (>= 3.7, < 5.0) - jekyll-feed (~> 0.1) - jekyll-gist (~> 1.5) - jekyll-include-cache (~> 0.1) - jekyll-paginate (~> 1.1) - jekyll-sitemap (~> 1.3) - minitest (5.16.0) - nokogiri (1.13.6-arm64-darwin) - racc (~> 1.4) - nokogiri (1.13.6-x64-mingw-ucrt) - racc (~> 1.4) - nokogiri (1.13.6-x64-unknown) - racc (~> 1.4) - nokogiri (1.13.6-x86_64-darwin) - racc (~> 1.4) - octokit (4.24.0) - faraday (>= 1, < 3) - sawyer (~> 0.9) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (4.0.7) - racc (1.6.0) - rb-fsevent (0.11.1) - rb-inotify (0.10.1) - ffi (~> 1.0) - rexml (3.2.5) - rouge (3.26.0) - ruby2_keywords (0.0.5) - rubyzip (2.3.2) - safe_yaml (1.0.5) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sawyer (0.9.2) - addressable (>= 2.3.5) - faraday (>= 0.17.3, < 3) - simpleidn (0.2.1) - unf (~> 0.1.4) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - thread_safe (0.3.6) - typhoeus (1.4.0) - ethon (>= 0.9.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unf_ext (0.0.8.2-x64-mingw-ucrt) - unicode-display_width (1.8.0) - webrick (1.7.0) - zeitwerk (2.6.0) - -PLATFORMS - universal-darwin-21 - x64-mingw-ucrt - x64-unknown - -DEPENDENCIES - faraday-retry - github-pages - http_parser.rb (~> 0.6.0) - jekyll-gist - jekyll-include-cache - jekyll-paginate - jekyll-relative-links - jekyll-remote-theme - jekyll-seo-tag - jekyll-sitemap - jekyll-titles-from-headings - minima (~> 2.5) - minimal-mistakes-jekyll - tzinfo (~> 1.2) - tzinfo-data - wdm (~> 0.1.0) - webrick (~> 1.7) - -BUNDLED WITH - 2.3.16 diff --git a/docs/google2fa716ab789ec378.html b/docs/google2fa716ab789ec378.html deleted file mode 100644 index 500921c257..0000000000 --- a/docs/google2fa716ab789ec378.html +++ /dev/null @@ -1 +0,0 @@ -google-site-verification: google2fa716ab789ec378.html \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index bf0c84b7c2..0000000000 --- a/docs/index.html +++ /dev/null @@ -1,3 +0,0 @@ ---- -layout: home ---- \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 0de9aa65e6..0000000000 --- a/docs/index.md +++ /dev/null @@ -1,21 +0,0 @@ -

- -

- -Welcome to Ten - the first Ethereum L2 with private smart contract state. - -Ten hyper-scales and encrypts Ethereum. 100% EVM, 100% Solidity. - -On this docsite you will find useful guidance on Ten, how to participate in the Testnet and, if you want to go deeper, read the whitepaper using the menu above. - -The Litepaper is available to view [here](https://ten.xyz/litepaper). - -A PDF version of the whitepaper is available [here](https://whitepaper.ten.xyz/assets/images/obscuro-whitepaper-0-10-0.pdf). - - -## Useful Resources - -1. [Github](https://github.com/ten-protocol/go-ten) -2. [Twitter](https://twitter.com/tenprotocol/) -3. [Discord](https://discord.gg/7pkKv2Tyfn) -4. [Blog](https://medium.com/obscuro-labs) diff --git a/docs/mstile-150x150.png b/docs/mstile-150x150.png deleted file mode 100644 index 09361e2086..0000000000 Binary files a/docs/mstile-150x150.png and /dev/null differ diff --git a/docs/safari-pinned-tab.svg b/docs/safari-pinned-tab.svg deleted file mode 100644 index 96591aa8f4..0000000000 --- a/docs/safari-pinned-tab.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - - diff --git a/docs/site.webmanifest b/docs/site.webmanifest deleted file mode 100644 index de65106f48..0000000000 --- a/docs/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "", - "short_name": "", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-256x256.png", - "sizes": "256x256", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -}